Mercurial > emacs
changeset 29809:88aa46c9dfde
(make_hash_table, maybe_resize_hash_table): Cast arg of
next_almost_prime.
author | Dave Love <fx@gnu.org> |
---|---|
date | Tue, 20 Jun 2000 18:28:07 +0000 |
parents | fa2c8534a53a |
children | 4406a040b043 |
files | src/fns.c |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/fns.c Tue Jun 20 18:24:59 2000 +0000 +++ b/src/fns.c Tue Jun 20 18:28:07 2000 +0000 @@ -3872,7 +3872,8 @@ h->key_and_value = Fmake_vector (make_number (2 * sz), Qnil); h->hash = Fmake_vector (size, Qnil); h->next = Fmake_vector (size, Qnil); - index_size = next_almost_prime (sz / XFLOATINT (rehash_threshold)); + /* Cast to int here avoids losing with gcc 2.95 on Tru64/Alpha... */ + index_size = next_almost_prime ((int) (sz / XFLOATINT (rehash_threshold))); h->index = Fmake_vector (make_number (index_size), Qnil); /* Set up the free list. */ @@ -3949,8 +3950,9 @@ else new_size = old_size * XFLOATINT (h->rehash_size); new_size = max (old_size + 1, new_size); - index_size = next_almost_prime (new_size - / XFLOATINT (h->rehash_threshold)); + index_size = next_almost_prime ((int) + (new_size + / XFLOATINT (h->rehash_threshold))); if (max (index_size, 2 * new_size) & ~VALMASK) error ("Hash table too large to resize");