Mercurial > emacs
diff src/data.c @ 110552:66f6be9b4d43
Fix int/EMACS_INT use in ccl.c, cmds.c, data.c, dispnew.c.
keyboard.c (make_lispy_position): Use EMACS_INT for buffer
positions.
xdisp.c (redisplay_internal, try_window_id)
(set_cursor_from_row, find_first_unchanged_at_end_row): Use
EMACS_INT for buffer positions.
dispextern.h (set_cursor_from_row, mode_line_string)
(marginal_area_string): Adjust prototypes.
dispnew.c (increment_matrix_positions)
(increment_row_positions, copy_glyph_row_contents)
(mode_line_string, marginal_area_string): Use EMACS_INT for buffer
positions.
dispextern.h (mode_line_string, marginal_area_string)
(increment_matrix_positions, increment_row_positions): Adjust
prototypes.
data.c (Faref, Faset): Use EMACS_INT for string length and
positions.
cmds.c (internal_self_insert): Use EMACS_INT for the count of
characters to insert.
ccl.c (Fccl_execute_on_string): Use EMACS_INT for string
position and size.
| author | Eli Zaretskii <eliz@gnu.org> |
|---|---|
| date | Fri, 24 Sep 2010 13:48:10 -0400 |
| parents | c4c8e4a16194 |
| children | 317ffffec7f3 |
line wrap: on
line diff
--- a/src/data.c Fri Sep 24 11:24:47 2010 -0400 +++ b/src/data.c Fri Sep 24 13:48:10 2010 -0400 @@ -2082,13 +2082,14 @@ or a byte-code object. IDX starts at 0. */) (register Lisp_Object array, Lisp_Object idx) { - register int idxval; + register EMACS_INT idxval; CHECK_NUMBER (idx); idxval = XINT (idx); if (STRINGP (array)) { - int c, idxval_byte; + int c; + EMACS_INT idxval_byte; if (idxval < 0 || idxval >= SCHARS (array)) args_out_of_range (array, idx); @@ -2136,7 +2137,7 @@ bool-vector. IDX starts at 0. */) (register Lisp_Object array, Lisp_Object idx, Lisp_Object newelt) { - register int idxval; + register EMACS_INT idxval; CHECK_NUMBER (idx); idxval = XINT (idx); @@ -2171,7 +2172,7 @@ } else if (STRING_MULTIBYTE (array)) { - int idxval_byte, prev_bytes, new_bytes, nbytes; + EMACS_INT idxval_byte, prev_bytes, new_bytes, nbytes; unsigned char workbuf[MAX_MULTIBYTE_LENGTH], *p0 = workbuf, *p1; if (idxval < 0 || idxval >= SCHARS (array)) @@ -2187,7 +2188,7 @@ if (prev_bytes != new_bytes) { /* We must relocate the string data. */ - int nchars = SCHARS (array); + EMACS_INT nchars = SCHARS (array); unsigned char *str; USE_SAFE_ALLOCA;
