bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#8771: Remove arbitrary 32-bit limit in Emacs hash tables


From: Stefan Monnier
Subject: bug#8771: Remove arbitrary 32-bit limit in Emacs hash tables
Date: Tue, 31 May 2011 10:03:28 -0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> Currently the Emacs source code uses 'unsigned' for hashes and 'int'
> for hash tables, but on 64-bit hosts hash tables can in principle be
> larger than what can be shoehorned into 32 bits.  Here's a proposed patch;
> most of it is pretty straightforward.

Sounds fine to me.  Style suggestions (really, nothing more than
suggestions) below.


        Stefan


> Remove arbitrary limit of 2**31 entries in hash tables.
> * category.c (hash_get_category_set): Use 'EMACS_UINT' and 'EMACS_INT'
> for hashes and hash indexes, instead of 'unsigned' and 'int'.
> * ccl.c (ccl_driver): Likewise.
> * charset.c (Fdefine_charset_internal): Likewise.
> * charset.h (struct charset.hash_index): Likewise.
> * composite.c (get_composition_id, gstring_lookup_cache):
> (composition_gstring_put_cache): Likewise.

Rather than "Likewise" you can use the following format:

   Remove arbitrary limit of 2**31 entries in hash tables.
   * category.c (hash_get_category_set):
   * ccl.c (ccl_driver):
   * charset.c (Fdefine_charset_internal):
   * charset.h (struct charset.hash_index):
   * composite.c (get_composition_id, gstring_lookup_cache):
   (composition_gstring_put_cache): Use 'EMACS_UINT' and 'EMACS_INT'
   for hashes and hash indexes, instead of 'unsigned' and 'int'.

And rather than
   
   * composite.c (get_composition_id, gstring_lookup_cache):
   (composition_gstring_put_cache): Foobar.

we usually write:
   
   * composite.c (get_composition_id, gstring_lookup_cache)
   (composition_gstring_put_cache): Foobar.






reply via email to

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