diff options
| author | Paul Eggert | 2011-07-07 10:55:38 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-07-07 10:55:38 -0700 |
| commit | 3300e6fd43c4059de955cddc37ec4212dab2b085 (patch) | |
| tree | 926457ff631bb5237ab48440eaccd1262eb73fd7 /src | |
| parent | fd05c7e9aae3cc636a7e13487dc50010084adae8 (diff) | |
| download | emacs-3300e6fd43c4059de955cddc37ec4212dab2b085.tar.gz emacs-3300e6fd43c4059de955cddc37ec4212dab2b085.zip | |
* keyboard.h (num_input_events): Now uintmax_t.
This is (very slightly) less likely to mess up due to wraparound.
All uses changed.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/callint.c | 2 | ||||
| -rw-r--r-- | src/keyboard.c | 4 | ||||
| -rw-r--r-- | src/keyboard.h | 4 |
4 files changed, 9 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 6d8ee7d5306..8d8e8789811 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2011-07-07 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-07-07 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | * keyboard.h (num_input_events): Now uintmax_t. | ||
| 4 | This is (very slightly) less likely to mess up due to wraparound. | ||
| 5 | All uses changed. | ||
| 6 | |||
| 3 | * buffer.c: Integer signedness fixes. | 7 | * buffer.c: Integer signedness fixes. |
| 4 | (alloc_buffer_text, enlarge_buffer_text): | 8 | (alloc_buffer_text, enlarge_buffer_text): |
| 5 | Use ptrdiff_t rather than size_t when either will do, as we prefer | 9 | Use ptrdiff_t rather than size_t when either will do, as we prefer |
diff --git a/src/callint.c b/src/callint.c index 1371b403e4b..d17f850eb53 100644 --- a/src/callint.c +++ b/src/callint.c | |||
| @@ -339,7 +339,7 @@ invoke it. If KEYS is omitted or nil, the return value of | |||
| 339 | { | 339 | { |
| 340 | Lisp_Object input; | 340 | Lisp_Object input; |
| 341 | Lisp_Object funval = Findirect_function (function, Qt); | 341 | Lisp_Object funval = Findirect_function (function, Qt); |
| 342 | size_t events = num_input_events; | 342 | uintmax_t events = num_input_events; |
| 343 | input = specs; | 343 | input = specs; |
| 344 | /* Compute the arg values using the user's expression. */ | 344 | /* Compute the arg values using the user's expression. */ |
| 345 | GCPRO2 (input, filter_specs); | 345 | GCPRO2 (input, filter_specs); |
diff --git a/src/keyboard.c b/src/keyboard.c index 16300e6154c..926ebc30b71 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -210,8 +210,8 @@ Lisp_Object unread_switch_frame; | |||
| 210 | /* Last size recorded for a current buffer which is not a minibuffer. */ | 210 | /* Last size recorded for a current buffer which is not a minibuffer. */ |
| 211 | static EMACS_INT last_non_minibuf_size; | 211 | static EMACS_INT last_non_minibuf_size; |
| 212 | 212 | ||
| 213 | /* Total number of times read_char has returned, modulo SIZE_MAX + 1. */ | 213 | /* Total number of times read_char has returned, modulo UINTMAX_MAX + 1. */ |
| 214 | size_t num_input_events; | 214 | uintmax_t num_input_events; |
| 215 | 215 | ||
| 216 | /* Value of num_nonmacro_input_events as of last auto save. */ | 216 | /* Value of num_nonmacro_input_events as of last auto save. */ |
| 217 | 217 | ||
diff --git a/src/keyboard.h b/src/keyboard.h index 91008a3ea24..69c804c873d 100644 --- a/src/keyboard.h +++ b/src/keyboard.h | |||
| @@ -191,8 +191,8 @@ extern KBOARD *current_kboard; | |||
| 191 | /* A list of all kboard objects, linked through next_kboard. */ | 191 | /* A list of all kboard objects, linked through next_kboard. */ |
| 192 | extern KBOARD *all_kboards; | 192 | extern KBOARD *all_kboards; |
| 193 | 193 | ||
| 194 | /* Total number of times read_char has returned, modulo SIZE_MAX + 1. */ | 194 | /* Total number of times read_char has returned, modulo UINTMAX_MAX + 1. */ |
| 195 | extern size_t num_input_events; | 195 | extern uintmax_t num_input_events; |
| 196 | 196 | ||
| 197 | /* Nonzero means polling for input is temporarily suppressed. */ | 197 | /* Nonzero means polling for input is temporarily suppressed. */ |
| 198 | extern int poll_suppress_count; | 198 | extern int poll_suppress_count; |