]> git.eshelyaron.com Git - emacs.git/commitdiff
Use ptrdiff_t, not int, for stack sizes
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 2 May 2017 22:04:54 +0000 (15:04 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 2 May 2017 22:05:08 +0000 (15:05 -0700)
* src/thread.c (invoke_thread_function):
* src/xterm.c (x_cr_export_frames):
Don’t assume SPECPDL_INDEX fits in ‘int’.

src/thread.c
src/xterm.c

index 9ea7e121a82fe969a2fd0820da64c00a48ffbb16..e3787971a53d44c52824bd6254911a382694edb4 100644 (file)
@@ -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);
index 3de1ffea90017071cfb1b8932477295c89bb74fb..e9068830f85153fe656c096c0f7cea9aa8cd54b7 100644 (file)
@@ -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);