[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/fns.c,v
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] Changes to emacs/src/fns.c,v |
Date: |
Sat, 13 Jan 2007 21:46:29 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Eli Zaretskii <eliz> 07/01/13 21:46:28
Index: fns.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/fns.c,v
retrieving revision 1.422
retrieving revision 1.423
diff -u -b -r1.422 -r1.423
--- fns.c 24 Nov 2006 19:53:56 -0000 1.422
+++ fns.c 13 Jan 2007 21:46:28 -0000 1.423
@@ -4668,6 +4668,7 @@
{
int old_size = HASH_TABLE_SIZE (h);
int i, new_size, index_size;
+ EMACS_INT nsize;
if (INTEGERP (h->rehash_size))
new_size = old_size + XFASTINT (h->rehash_size);
@@ -4677,7 +4678,10 @@
index_size = next_almost_prime ((int)
(new_size
/ XFLOATINT (h->rehash_threshold)));
- if (max (index_size, 2 * new_size) > MOST_POSITIVE_FIXNUM)
+ /* Assignment to EMACS_INT stops GCC whining about limited range
+ of data type. */
+ nsize = max (index_size, 2 * new_size);
+ if (nsize > MOST_POSITIVE_FIXNUM)
error ("Hash table too large to resize");
h->key_and_value = larger_vector (h->key_and_value, 2 * new_size, Qnil);
- [Emacs-diffs] Changes to emacs/src/fns.c,v,
Eli Zaretskii <=