diff options
| author | Stefan Monnier | 2010-09-30 01:28:20 +0200 |
|---|---|---|
| committer | Stefan Monnier | 2010-09-30 01:28:20 +0200 |
| commit | a01a7932080e8a6e7bc8472c58cefabcc2c37df3 (patch) | |
| tree | 94b28b19c8f1536e76ffe7d5826811b74a79e3a5 /src/data.c | |
| parent | cc390e46c7ba95b76ea133d98fd386214cd01709 (diff) | |
| parent | 6b0f7311f16646e0de2045b2410e20921901c616 (diff) | |
| download | emacs-a01a7932080e8a6e7bc8472c58cefabcc2c37df3.tar.gz emacs-a01a7932080e8a6e7bc8472c58cefabcc2c37df3.zip | |
Merge from trunk
Diffstat (limited to 'src/data.c')
| -rw-r--r-- | src/data.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/data.c b/src/data.c index 9490b7ac79a..78ccb75ca89 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -2092,13 +2092,14 @@ ARRAY may be a vector, a string, a char-table, a bool-vector, | |||
| 2092 | or a byte-code object. IDX starts at 0. */) | 2092 | or a byte-code object. IDX starts at 0. */) |
| 2093 | (register Lisp_Object array, Lisp_Object idx) | 2093 | (register Lisp_Object array, Lisp_Object idx) |
| 2094 | { | 2094 | { |
| 2095 | register int idxval; | 2095 | register EMACS_INT idxval; |
| 2096 | 2096 | ||
| 2097 | CHECK_NUMBER (idx); | 2097 | CHECK_NUMBER (idx); |
| 2098 | idxval = XINT (idx); | 2098 | idxval = XINT (idx); |
| 2099 | if (STRINGP (array)) | 2099 | if (STRINGP (array)) |
| 2100 | { | 2100 | { |
| 2101 | int c, idxval_byte; | 2101 | int c; |
| 2102 | EMACS_INT idxval_byte; | ||
| 2102 | 2103 | ||
| 2103 | if (idxval < 0 || idxval >= SCHARS (array)) | 2104 | if (idxval < 0 || idxval >= SCHARS (array)) |
| 2104 | args_out_of_range (array, idx); | 2105 | args_out_of_range (array, idx); |
| @@ -2146,7 +2147,7 @@ Return NEWELT. ARRAY may be a vector, a string, a char-table or a | |||
| 2146 | bool-vector. IDX starts at 0. */) | 2147 | bool-vector. IDX starts at 0. */) |
| 2147 | (register Lisp_Object array, Lisp_Object idx, Lisp_Object newelt) | 2148 | (register Lisp_Object array, Lisp_Object idx, Lisp_Object newelt) |
| 2148 | { | 2149 | { |
| 2149 | register int idxval; | 2150 | register EMACS_INT idxval; |
| 2150 | 2151 | ||
| 2151 | CHECK_NUMBER (idx); | 2152 | CHECK_NUMBER (idx); |
| 2152 | idxval = XINT (idx); | 2153 | idxval = XINT (idx); |
| @@ -2181,7 +2182,7 @@ bool-vector. IDX starts at 0. */) | |||
| 2181 | } | 2182 | } |
| 2182 | else if (STRING_MULTIBYTE (array)) | 2183 | else if (STRING_MULTIBYTE (array)) |
| 2183 | { | 2184 | { |
| 2184 | int idxval_byte, prev_bytes, new_bytes, nbytes; | 2185 | EMACS_INT idxval_byte, prev_bytes, new_bytes, nbytes; |
| 2185 | unsigned char workbuf[MAX_MULTIBYTE_LENGTH], *p0 = workbuf, *p1; | 2186 | unsigned char workbuf[MAX_MULTIBYTE_LENGTH], *p0 = workbuf, *p1; |
| 2186 | 2187 | ||
| 2187 | if (idxval < 0 || idxval >= SCHARS (array)) | 2188 | if (idxval < 0 || idxval >= SCHARS (array)) |
| @@ -2197,7 +2198,7 @@ bool-vector. IDX starts at 0. */) | |||
| 2197 | if (prev_bytes != new_bytes) | 2198 | if (prev_bytes != new_bytes) |
| 2198 | { | 2199 | { |
| 2199 | /* We must relocate the string data. */ | 2200 | /* We must relocate the string data. */ |
| 2200 | int nchars = SCHARS (array); | 2201 | EMACS_INT nchars = SCHARS (array); |
| 2201 | unsigned char *str; | 2202 | unsigned char *str; |
| 2202 | USE_SAFE_ALLOCA; | 2203 | USE_SAFE_ALLOCA; |
| 2203 | 2204 | ||