Commit ba1b3409 authored by Paul Eggert's avatar Paul Eggert
Browse files

Be consistent about list length fixnum overflow

* src/fns.c (Flength, Fproper_list_p): Use overflow_error to
report the (typically impossible) fixnum overflow.
parent 50445767
Pipeline #425 failed with stage
in 23 minutes and 38 seconds
......@@ -118,7 +118,7 @@ To get the number of bytes, use `string-bytes'. */)
i++;
CHECK_LIST_END (sequence, sequence);
if (MOST_POSITIVE_FIXNUM < i)
error ("List too long");
overflow_error ();
val = make_fixnum (i);
}
else if (NILP (sequence))
......@@ -161,7 +161,7 @@ A proper list is neither circular nor dotted (i.e., its last cdr is nil). */
if (!NILP (last_tail))
return Qnil;
if (MOST_POSITIVE_FIXNUM < len)
xsignal0 (Qoverflow_error);
overflow_error ();
return make_fixnum (len);
}
......
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