The R Project SVN R

Rev

Rev 77329 | Rev 78072 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 77329 Rev 77395
Line 3838... Line 3838...
3838
    if (len > INT_MAX)
3838
    if (len > INT_MAX)
3839
	error("R character strings are limited to 2^31-1 bytes");
3839
	error("R character strings are limited to 2^31-1 bytes");
3840
   return mkCharLenCE(name, (int) len, enc);
3840
   return mkCharLenCE(name, (int) len, enc);
3841
}
3841
}
3842
 
3842
 
3843
/* no longer used in R but docuented in 2.7.x */
3843
/* no longer used in R but documented in 2.7.x */
3844
SEXP mkCharLen(const char *name, int len)
3844
SEXP mkCharLen(const char *name, int len)
3845
{
3845
{
3846
    return mkCharLenCE(name, len, CE_NATIVE);
3846
    return mkCharLenCE(name, len, CE_NATIVE);
3847
}
3847
}
3848
 
3848
 
Line 3937... Line 3937...
3937
    Rprintf("Resized: size %d => %d\tpri %d => %d\n",
3937
    Rprintf("Resized: size %d => %d\tpri %d => %d\n",
3938
	    oldsize, newsize, oldpri, newpri);
3938
	    oldsize, newsize, oldpri, newpri);
3939
#endif
3939
#endif
3940
}
3940
}
3941
 
3941
 
-
 
3942
 
3942
/* mkCharCE - make a character (CHARSXP) variable and set its
3943
/* mkCharLenCE - make a character (CHARSXP) variable and set its
3943
   encoding bit.  If a CHARSXP with the same string already exists in
3944
   encoding bit.  If a CHARSXP with the same string already exists in
3944
   the global CHARSXP cache, R_StringHash, it is returned.  Otherwise,
3945
   the global CHARSXP cache, R_StringHash, it is returned.  Otherwise,
3945
   a new CHARSXP is created, added to the cache and then returned. */
3946
   a new CHARSXP is created, added to the cache and then returned. */
3946
 
3947
 
3947
 
-
 
3948
SEXP mkCharLenCE(const char *name, int len, cetype_t enc)
3948
SEXP mkCharLenCE(const char *name, int len, cetype_t enc)
3949
{
3949
{
3950
    SEXP cval, chain;
3950
    SEXP cval, chain;
3951
    unsigned int hashcode;
3951
    unsigned int hashcode;
3952
    int need_enc;
3952
    int need_enc;