Skip to content

Commit

Permalink
Added missing semicolon in envir.c and better version of HAS_GENUINE
Browse files Browse the repository at this point in the history
ATTRIB in memory.c -- the original was not tracing some cases where it
should.


git-svn-id: https://svn.r-project.org/R/trunk@43052 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
luke committed Oct 2, 2007
1 parent fe8d3a3 commit ff8d8ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/envir.c
Expand Up @@ -3316,7 +3316,7 @@ static void R_StringHash_resize(unsigned int newsize)
/* move the current chain link to the new chain */
#ifdef USE_ATTRIB_FIELD_FOR_CHARSXP_CACHE_CHAINS
/* this is a destrictive modification */
new_chain = SET_CXTAIL(val, new_chain)
new_chain = SET_CXTAIL(val, new_chain);
SET_VECTOR_ELT(new_table, new_hashcode, new_chain);
#else
SET_VECTOR_ELT(new_table, new_hashcode, CONS(val, new_chain));
Expand Down
3 changes: 2 additions & 1 deletion src/main/memory.c
Expand Up @@ -421,7 +421,8 @@ static R_size_t R_NodesInUse = 0;
part of a hash chain. Theoretically, for CHARSXPs the ATTRIB field
should always be either R_NilValue or a CHARSXP. */
# define HAS_GENUINE_ATTRIB(x) \
(ATTRIB(x) != R_NilValue && TYPEOF(ATTRIB(x)) != CHARSXP)
(ATTRIB(x) != R_NilValue && \
(TYPEOF(x) != CHARSXP || TYPEOF(ATTRIB(x)) != CHARSXP))
#else
# define HAS_GENUINE_ATTRIB(x) (ATTRIB(x) != R_NilValue)
#endif
Expand Down

0 comments on commit ff8d8ad

Please sign in to comment.