diff options
| author | Paul Eggert | 2012-04-21 21:35:17 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-04-21 21:35:17 -0700 |
| commit | a8b7caa345d8215468f558c771b703a3b89e2d77 (patch) | |
| tree | 90418c86ea48add239b78b536c4039800784fbc8 | |
| parent | af52196c9fb39966da3a0e00c05b62977797d4e5 (diff) | |
| download | emacs-a8b7caa345d8215468f558c771b703a3b89e2d77.tar.gz emacs-a8b7caa345d8215468f558c771b703a3b89e2d77.zip | |
* print.c: (print_depth, new_backquote_output, print_number_index):
Use ptrdiff_t, not int, where int might not be wide enough.
| -rw-r--r-- | src/ChangeLog | 2 | ||||
| -rw-r--r-- | src/print.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 0504fb006a3..336c175be5c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -559,6 +559,8 @@ | |||
| 559 | (Fexternal_debugging_output): Don't overflow EMACS_INT->int conversion. | 559 | (Fexternal_debugging_output): Don't overflow EMACS_INT->int conversion. |
| 560 | (print_error_message): Use SAFE_ALLOCA, not alloca. | 560 | (print_error_message): Use SAFE_ALLOCA, not alloca. |
| 561 | (print_object): Use int, not EMACS_INT, where int is wide enough. | 561 | (print_object): Use int, not EMACS_INT, where int is wide enough. |
| 562 | (print_depth, new_backquote_output, print_number_index): | ||
| 563 | Use ptrdiff_t, not int, where int might not be wide enough. | ||
| 562 | * process.c (Fdelete_process): Don't assume pid fits into EMACS_INT. | 564 | * process.c (Fdelete_process): Don't assume pid fits into EMACS_INT. |
| 563 | (Fset_process_window_size, Fformat_network_address) | 565 | (Fset_process_window_size, Fformat_network_address) |
| 564 | (get_lisp_to_sockaddr_size, set_socket_option, Fmake_network_process) | 566 | (get_lisp_to_sockaddr_size, set_socket_option, Fmake_network_process) |
diff --git a/src/print.c b/src/print.c index 92e62520954..bfe3287b92c 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -55,10 +55,10 @@ static Lisp_Object Qfloat_output_format; | |||
| 55 | #endif | 55 | #endif |
| 56 | 56 | ||
| 57 | /* Avoid actual stack overflow in print. */ | 57 | /* Avoid actual stack overflow in print. */ |
| 58 | static int print_depth; | 58 | static ptrdiff_t print_depth; |
| 59 | 59 | ||
| 60 | /* Level of nesting inside outputting backquote in new style. */ | 60 | /* Level of nesting inside outputting backquote in new style. */ |
| 61 | static int new_backquote_output; | 61 | static ptrdiff_t new_backquote_output; |
| 62 | 62 | ||
| 63 | /* Detect most circularities to print finite output. */ | 63 | /* Detect most circularities to print finite output. */ |
| 64 | #define PRINT_CIRCLE 200 | 64 | #define PRINT_CIRCLE 200 |
| @@ -86,7 +86,7 @@ static Lisp_Object Qprint_escape_multibyte, Qprint_escape_nonascii; | |||
| 86 | N the object has been printed so we can refer to it as #N#. | 86 | N the object has been printed so we can refer to it as #N#. |
| 87 | print_number_index holds the largest N already used. | 87 | print_number_index holds the largest N already used. |
| 88 | N has to be striclty larger than 0 since we need to distinguish -N. */ | 88 | N has to be striclty larger than 0 since we need to distinguish -N. */ |
| 89 | static int print_number_index; | 89 | static ptrdiff_t print_number_index; |
| 90 | static void print_interval (INTERVAL interval, Lisp_Object printcharfun); | 90 | static void print_interval (INTERVAL interval, Lisp_Object printcharfun); |
| 91 | 91 | ||
| 92 | /* GDB resets this to zero on W32 to disable OutputDebugString calls. */ | 92 | /* GDB resets this to zero on W32 to disable OutputDebugString calls. */ |