]> git.eshelyaron.com Git - emacs.git/commitdiff
(inhibit_garbage_collection): Don't exceed value an int can hold.
authorAndreas Schwab <schwab@suse.de>
Fri, 7 Dec 2001 12:32:21 +0000 (12:32 +0000)
committerAndreas Schwab <schwab@suse.de>
Fri, 7 Dec 2001 12:32:21 +0000 (12:32 +0000)
src/alloc.c

index 6a47b872d2358ad8ff28a2e2f6cfce320a75c2f0..731391a779bf0aa5cbd4bf310b2be707fff05ca7 100644 (file)
@@ -4012,7 +4012,9 @@ int
 inhibit_garbage_collection ()
 {
   int count = specpdl_ptr - specpdl;
-  specbind (Qgc_cons_threshold, make_number (MOST_POSITIVE_FIXNUM));
+  int nbits = min (VALBITS, BITS_PER_INT);
+
+  specbind (Qgc_cons_threshold, make_number (((EMACS_INT) 1 << (nbits - 1)) - 1));
   return count;
 }