Be consistent about list length fixnum overflow
* src/fns.c (Flength, Fproper_list_p): Use overflow_error to report the (typically impossible) fixnum overflow.
This commit is contained in:
parent
504457673d
commit
ba1b340988
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue