mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-24 13:57:36 +00:00
Change hash_idx_t to int32_t on all platforms
* src/lisp.h (hash_idx_t): Change to int32_t. * src/fns.c (hash_index_size): Adapt to new index type.
This commit is contained in:
parent
ed06de52a5
commit
68f8bc3111
2 changed files with 3 additions and 2 deletions
|
|
@ -4515,7 +4515,8 @@ hash_index_size (ptrdiff_t size)
|
|||
/* An upper bound on the size of a hash table index. It must fit in
|
||||
ptrdiff_t and be a valid Emacs fixnum. */
|
||||
ptrdiff_t upper_bound = min (MOST_POSITIVE_FIXNUM,
|
||||
PTRDIFF_MAX / sizeof (ptrdiff_t));
|
||||
min (TYPE_MAXIMUM (hash_idx_t),
|
||||
PTRDIFF_MAX / sizeof (ptrdiff_t)));
|
||||
ptrdiff_t index_size = size + (size >> 2); /* 1.25x larger */
|
||||
if (index_size < upper_bound)
|
||||
index_size = next_almost_prime (index_size);
|
||||
|
|
|
|||
|
|
@ -2432,7 +2432,7 @@ verify (FIXNUM_OVERFLOW_P (hash_unused));
|
|||
|
||||
/* The type of a hash table index, both for table indices and index
|
||||
(hash) indices. It's signed and a subtype of ptrdiff_t. */
|
||||
typedef ptrdiff_t hash_idx_t;
|
||||
typedef int32_t hash_idx_t;
|
||||
|
||||
struct Lisp_Hash_Table
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue