emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master ba1b340: Be consistent about list length fixnum ove


From: Paul Eggert
Subject: [Emacs-diffs] master ba1b340: Be consistent about list length fixnum overflow
Date: Tue, 1 Jan 2019 14:43:22 -0500 (EST)

branch: master
commit ba1b340988ab79a1173f402f8f66bff06e0dd7c5
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    Be consistent about list length fixnum overflow
    
    * src/fns.c (Flength, Fproper_list_p): Use overflow_error to
    report the (typically impossible) fixnum overflow.
---
 src/fns.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/fns.c b/src/fns.c
index e40eb2e..7791310 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);
 }
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]