diff options
author | Richard M. Stallman <rms@gnu.org> | 1994-12-30 01:50:01 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1994-12-30 01:50:01 +0000 |
commit | f9cf06cef20516bd9744e60b6a496284655d8e6f (patch) | |
tree | 992bff80f3bf4931fcf02ce1e93b20f5932a800e | |
parent | 1d7825d7dce0f8a4112358a613f431c994a28b16 (diff) | |
download | emacs-f9cf06cef20516bd9744e60b6a496284655d8e6f.tar.gz |
(Faref): Handle compiled function as pseudovector.
-rw-r--r-- | src/data.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/data.c b/src/data.c index 5a4c26e017c..482be25e1cb 100644 --- a/src/data.c +++ b/src/data.c @@ -1350,9 +1350,15 @@ ARRAY may be a vector or a string, or a byte-code object. INDEX starts at 0.") } else { - if (!VECTORP (array) && !COMPILEDP (array)) - array = wrong_type_argument (Qarrayp, array); - if (idxval < 0 || idxval >= XVECTOR (array)->size) + int size; + if (VECTORP (array)) + size = XVECTOR (array)->size; + else if (COMPILEDP (array)) + size = XVECTOR (array)->size & PSEUDOVECTOR_SIZE_MASK; + else + wrong_type_argument (Qarrayp, array); + + if (idxval < 0 || idxval >= size) args_out_of_range (array, idx); return XVECTOR (array)->contents[idxval]; } |