Mercurial > emacs
comparison src/data.c @ 9301:e6daff3e246f
(Faref, Farray_length): Don't use XFASTINT as an lvalue.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Tue, 04 Oct 1994 15:44:37 +0000 |
parents | cda13734e32c |
children | 0bba3bd707c7 |
comparison
equal
deleted
inserted
replaced
9300:84822d6ed3be | 9301:e6daff3e246f |
---|---|
1334 if (idxval < 0 || idxval >= XVECTOR (array)->size) | 1334 if (idxval < 0 || idxval >= XVECTOR (array)->size) |
1335 args_out_of_range (array, idx); | 1335 args_out_of_range (array, idx); |
1336 if (STRINGP (array)) | 1336 if (STRINGP (array)) |
1337 { | 1337 { |
1338 Lisp_Object val; | 1338 Lisp_Object val; |
1339 XFASTINT (val) = (unsigned char) XSTRING (array)->data[idxval]; | 1339 XSETFASTINT (val, (unsigned char) XSTRING (array)->data[idxval]); |
1340 return val; | 1340 return val; |
1341 } | 1341 } |
1342 else | 1342 else |
1343 return XVECTOR (array)->contents[idxval]; | 1343 return XVECTOR (array)->contents[idxval]; |
1344 } | 1344 } |
1376 register Lisp_Object array; | 1376 register Lisp_Object array; |
1377 { | 1377 { |
1378 register Lisp_Object size; | 1378 register Lisp_Object size; |
1379 if (!VECTORP (array) && !STRINGP (array) && !COMPILEDP (array)) | 1379 if (!VECTORP (array) && !STRINGP (array) && !COMPILEDP (array)) |
1380 array = wrong_type_argument (Qarrayp, array); | 1380 array = wrong_type_argument (Qarrayp, array); |
1381 XFASTINT (size) = XVECTOR (array)->size; | 1381 XSETFASTINT (size, XVECTOR (array)->size); |
1382 return size; | 1382 return size; |
1383 } | 1383 } |
1384 | 1384 |
1385 /* Arithmetic functions */ | 1385 /* Arithmetic functions */ |
1386 | 1386 |