From 7d100a81b7b1127f55cd1033ce5a6ce2d350ba19 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 17 Jun 2011 12:45:29 -0700 Subject: [PATCH] * composite.c (get_composition_id, composition_gstring_put_cache): Use EMACS_INT, not EMACS_UINT, for indexes. --- src/ChangeLog | 2 ++ src/composite.c | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 6ff0fe49307..f9ed0c6cfc7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -3,6 +3,8 @@ * composite.c: Don't truncate sizes to 'int'. (composition_gstring_p, composition_reseat_it) (composition_adjust_point): Use EMACS_INT, not int. + (get_composition_id, composition_gstring_put_cache): Use EMACS_INT, + not EMACS_UINT, for indexes. * category.h (CATEGORY_SET_P): Remove unnecessary cast to EMACS_INT. diff --git a/src/composite.c b/src/composite.c index 10946835705..1bc7b435e11 100644 --- a/src/composite.c +++ b/src/composite.c @@ -285,7 +285,7 @@ get_composition_id (EMACS_INT charpos, EMACS_INT bytepos, EMACS_INT nchars, && VECTORP (AREF (components, 0))) { /* COMPONENTS is a glyph-string. */ - EMACS_UINT len = ASIZE (key); + EMACS_INT len = ASIZE (key); for (i = 1; i < len; i++) if (! VECTORP (AREF (key, i))) @@ -293,7 +293,7 @@ get_composition_id (EMACS_INT charpos, EMACS_INT bytepos, EMACS_INT nchars, } else if (VECTORP (components) || CONSP (components)) { - EMACS_UINT len = ASIZE (key); + EMACS_INT len = ASIZE (key); /* The number of elements should be odd. */ if ((len % 2) == 0) @@ -673,7 +673,7 @@ composition_gstring_put_cache (Lisp_Object gstring, EMACS_INT len) hash = h->hashfn (h, header); if (len < 0) { - EMACS_UINT j, glyph_len = LGSTRING_GLYPH_LEN (gstring); + EMACS_INT j, glyph_len = LGSTRING_GLYPH_LEN (gstring); for (j = 0; j < glyph_len; j++) if (NILP (LGSTRING_GLYPH (gstring, j))) break; -- 2.39.2