1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-18 20:00:36 -08:00

Use ptrdiff_t for hash table indexes.

* category.c (hash_get_category_set):
* ccl.c (ccl_driver):
* charset.h (struct charset.hash_index, CHECK_CHARSET_GET_ID):
* coding.c (coding_system_charset_list, detect_coding_system):
* coding.h (struct coding_system.id):
* composite.c (get_composition_id, gstring_lookup_cache):
* fns.c (hash_lookup, hash_put, Fgethash, Fputhash):
* image.c (xpm_get_color_table_h):
* lisp.h (hash_lookup, hash_put):
* minibuf.c (Ftest_completion):
Use ptrdiff_t for hash table indexes, not int (which is too
narrow, on 64-bit hosts) or EMACS_INT (which is too wide, on
32-bit --with-wide-int hosts).
This commit is contained in:
Paul Eggert 2011-07-18 23:07:07 -07:00
parent e097a6fa86
commit d3411f89d3
11 changed files with 36 additions and 21 deletions

View file

@ -5838,7 +5838,7 @@ coding_charset_list (struct coding_system *coding)
Lisp_Object
coding_system_charset_list (Lisp_Object coding_system)
{
int id;
ptrdiff_t id;
Lisp_Object attrs, charset_list;
CHECK_CODING_SYSTEM_GET_ID (coding_system, id);
@ -8076,7 +8076,7 @@ detect_coding_system (const unsigned char *src,
Lisp_Object attrs, eol_type;
Lisp_Object val = Qnil;
struct coding_system coding;
int id;
ptrdiff_t id;
struct coding_detection_info detect_info;
enum coding_category base_category;
int null_byte_found = 0, eight_bit_found = 0;