emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master b867eb8: Use ptrdiff_t, not int, for stack sizes


From: Paul Eggert
Subject: [Emacs-diffs] master b867eb8: Use ptrdiff_t, not int, for stack sizes
Date: Tue, 2 May 2017 18:05:12 -0400 (EDT)

branch: master
commit b867eb8ecf67e9fb8167d950316ba762ac561b1c
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    Use ptrdiff_t, not int, for stack sizes
    
    * src/thread.c (invoke_thread_function):
    * src/xterm.c (x_cr_export_frames):
    Don’t assume SPECPDL_INDEX fits in ‘int’.
---
 src/thread.c | 2 +-
 src/xterm.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/thread.c b/src/thread.c
index 9ea7e12..e378797 100644
--- a/src/thread.c
+++ b/src/thread.c
@@ -664,7 +664,7 @@ DEFUN ("thread-yield", Fthread_yield, Sthread_yield, 0, 0, 
0,
 static Lisp_Object
 invoke_thread_function (void)
 {
-  int count = SPECPDL_INDEX ();
+  ptrdiff_t count = SPECPDL_INDEX ();
 
   Ffuncall (1, &current_thread->function);
   return unbind_to (count, Qnil);
diff --git a/src/xterm.c b/src/xterm.c
index 3de1ffe..e906883 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -569,7 +569,7 @@ x_cr_export_frames (Lisp_Object frames, 
cairo_surface_type_t surface_type)
   int width, height;
   void (*surface_set_size_func) (cairo_surface_t *, double, double) = NULL;
   Lisp_Object acc = Qnil;
-  int count = SPECPDL_INDEX ();
+  ptrdiff_t count = SPECPDL_INDEX ();
 
   specbind (Qredisplay_dont_pause, Qt);
   redisplay_preserve_echo_area (31);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]