diff options
| author | Paul Eggert | 2011-06-12 18:35:47 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-06-12 18:35:47 -0700 |
| commit | f8c86b69a8489f33709de6b869be369a34d5adb0 (patch) | |
| tree | c508e36cfb351ac8ba43c7bc92931002f9a3bdfb /src | |
| parent | 34206dd201b905b8f9eec84b4e90ba591b06a79a (diff) | |
| download | emacs-f8c86b69a8489f33709de6b869be369a34d5adb0.tar.gz emacs-f8c86b69a8489f33709de6b869be369a34d5adb0.zip | |
* composite.c: Use int, not EMACS_INT, for characters.
(fill_gstring_body, composition_compute_stop_pos): Use int, not
EMACS_INT, for values that are known to be in character range.
This doesn't fix any bugs but is the usual style inside Emacs and
may generate better code on 32-bit machines.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/composite.c | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 6a6ae7d53cf..8f98b251234 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,11 @@ | |||
| 1 | 2011-06-13 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-06-13 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | * composite.c: Use int, not EMACS_INT, for characters. | ||
| 4 | (fill_gstring_body, composition_compute_stop_pos): Use int, not | ||
| 5 | EMACS_INT, for values that are known to be in character range. | ||
| 6 | This doesn't fix any bugs but is the usual style inside Emacs and | ||
| 7 | may generate better code on 32-bit machines. | ||
| 8 | |||
| 3 | Make sure a 64-bit char is never passed to ENCODE_CHAR. | 9 | Make sure a 64-bit char is never passed to ENCODE_CHAR. |
| 4 | This is for reasons similar to the recent CHAR_STRING fix. | 10 | This is for reasons similar to the recent CHAR_STRING fix. |
| 5 | * charset.c (Fencode_char): Check that character arg is actually | 11 | * charset.c (Fencode_char): Check that character arg is actually |
diff --git a/src/composite.c b/src/composite.c index ab9ec3f5a03..51b7669cb4f 100644 --- a/src/composite.c +++ b/src/composite.c | |||
| @@ -858,7 +858,7 @@ fill_gstring_body (Lisp_Object gstring) | |||
| 858 | for (i = 0; i < len; i++) | 858 | for (i = 0; i < len; i++) |
| 859 | { | 859 | { |
| 860 | Lisp_Object g = LGSTRING_GLYPH (gstring, i); | 860 | Lisp_Object g = LGSTRING_GLYPH (gstring, i); |
| 861 | EMACS_INT c = XINT (AREF (header, i + 1)); | 861 | int c = XFASTINT (AREF (header, i + 1)); |
| 862 | 862 | ||
| 863 | if (NILP (g)) | 863 | if (NILP (g)) |
| 864 | { | 864 | { |
| @@ -995,7 +995,8 @@ static int _work_char; | |||
| 995 | void | 995 | void |
| 996 | composition_compute_stop_pos (struct composition_it *cmp_it, EMACS_INT charpos, EMACS_INT bytepos, EMACS_INT endpos, Lisp_Object string) | 996 | composition_compute_stop_pos (struct composition_it *cmp_it, EMACS_INT charpos, EMACS_INT bytepos, EMACS_INT endpos, Lisp_Object string) |
| 997 | { | 997 | { |
| 998 | EMACS_INT start, end, c; | 998 | EMACS_INT start, end; |
| 999 | int c; | ||
| 999 | Lisp_Object prop, val; | 1000 | Lisp_Object prop, val; |
| 1000 | /* This is from forward_to_next_line_start in xdisp.c. */ | 1001 | /* This is from forward_to_next_line_start in xdisp.c. */ |
| 1001 | const int MAX_NEWLINE_DISTANCE = 500; | 1002 | const int MAX_NEWLINE_DISTANCE = 500; |