diff options
| author | Paul Eggert | 2011-07-19 14:39:36 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-07-19 14:39:36 -0700 |
| commit | ebfa62c01481332072f519581aaf4d8d7da49e68 (patch) | |
| tree | c62f6a866f44165112999f66f5ca7e5f30dc2af3 /src/dispextern.h | |
| parent | 63cf7836ae7616ce91d7eeaeac997d71609e191b (diff) | |
| download | emacs-ebfa62c01481332072f519581aaf4d8d7da49e68.tar.gz emacs-ebfa62c01481332072f519581aaf4d8d7da49e68.zip | |
Use ptrdiff_t for composition IDs.
* character.c (lisp_string_width):
* composite.c (composition_table_size, n_compositions)
(get_composition_id, composition_gstring_from_id):
* dispextern.h (struct glyph_string.cmp_id, struct composition_it.id):
* xdisp.c (BUILD_COMPOSITE_GLYPH_STRING):
* window.c (Frecenter):
Use ptrdiff_t, not int, for composition IDs.
* composite.c (get_composition_id): Check for integer overflow.
* composite.h: Adjust prototypes to match the above changes.
Diffstat (limited to 'src/dispextern.h')
| -rw-r--r-- | src/dispextern.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dispextern.h b/src/dispextern.h index bb4da7d52a8..1d7bf5d53ec 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -1240,7 +1240,7 @@ struct glyph_string | |||
| 1240 | struct composition *cmp; | 1240 | struct composition *cmp; |
| 1241 | 1241 | ||
| 1242 | /* If not negative, this string describes a compos. */ | 1242 | /* If not negative, this string describes a compos. */ |
| 1243 | int cmp_id; | 1243 | ptrdiff_t cmp_id; |
| 1244 | 1244 | ||
| 1245 | /* Start and end glyph indices in a glyph-string. */ | 1245 | /* Start and end glyph indices in a glyph-string. */ |
| 1246 | int cmp_from, cmp_to; | 1246 | int cmp_from, cmp_to; |
| @@ -2056,7 +2056,7 @@ struct composition_it | |||
| 2056 | EMACS_INT stop_pos; | 2056 | EMACS_INT stop_pos; |
| 2057 | /* ID number of the composition or glyph-string. If negative, we | 2057 | /* ID number of the composition or glyph-string. If negative, we |
| 2058 | are not iterating over a composition now. */ | 2058 | are not iterating over a composition now. */ |
| 2059 | int id; | 2059 | ptrdiff_t id; |
| 2060 | /* If non-negative, character that triggers the automatic | 2060 | /* If non-negative, character that triggers the automatic |
| 2061 | composition at `stop_pos', and this is an automatic composition. | 2061 | composition at `stop_pos', and this is an automatic composition. |
| 2062 | If negative, this is a static composition. This is set to -2 | 2062 | If negative, this is a static composition. This is set to -2 |