From: Paul Eggert Date: Tue, 1 Jan 2019 19:41:16 +0000 (-0800) Subject: Be consistent about list length fixnum overflow X-Git-Tag: emacs-27.0.90~3883 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ba1b340988ab79a1173f402f8f66bff06e0dd7c5;p=emacs.git Be consistent about list length fixnum overflow * src/fns.c (Flength, Fproper_list_p): Use overflow_error to report the (typically impossible) fixnum overflow. --- diff --git a/src/fns.c b/src/fns.c index e40eb2e54a4..7791310a313 100644 --- a/src/fns.c +++ b/src/fns.c @@ -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); }