Commit 7f358972 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(Faref): Handle compiled function as pseudovector.

parent 08623493
......@@ -1350,9 +1350,15 @@ ARRAY may be a vector or a string, or a byte-code object. INDEX starts at 0.")
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;
wrong_type_argument (Qarrayp, array);
if (idxval < 0 || idxval >= size)
args_out_of_range (array, idx);
return XVECTOR (array)->contents[idxval];
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment