aboutsummaryrefslogtreecommitdiffstats
path: root/src/lisp.h
diff options
context:
space:
mode:
authorPaul Eggert2019-07-21 12:31:51 -0700
committerPaul Eggert2019-07-21 12:32:16 -0700
commit5d4dd552c29279b8a9e6ed269a2dc3afc36f73b9 (patch)
tree95edeff83e756072c35f974f6271ba8c191d8436 /src/lisp.h
parentd02c2f7f6507105605ed0596a7e26acd5b3b8122 (diff)
downloademacs-5d4dd552c29279b8a9e6ed269a2dc3afc36f73b9.tar.gz
emacs-5d4dd552c29279b8a9e6ed269a2dc3afc36f73b9.zip
Fix lifetime error in previous patch
Problem reported by Pip Cet in: https://lists.gnu.org/r/emacs-devel/2019-07/msg00520.html * src/alloc.c (inhibit_garbage_collection): Use new function. (allow_garbage_collection): Accept intmax_t, not pointer. * src/eval.c (default_toplevel_binding, do_one_unbind) (backtrace_eval_unrewind, Fbacktrace__locals, mark_specpdl): Support SPECPDL_UNWIND_INTMAX. (record_unwind_protect_excursion): New function. * src/lisp.h (enum specbind_tag): New constant SPECPDL_UNWIND_INTMAX. (union specbinding): New member unwind_intmax.
Diffstat (limited to 'src/lisp.h')
-rw-r--r--src/lisp.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lisp.h b/src/lisp.h
index 6d101fed908..9d37629bc46 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -3156,6 +3156,7 @@ enum specbind_tag {
3156 Its elements are potential Lisp_Objects. */ 3156 Its elements are potential Lisp_Objects. */
3157 SPECPDL_UNWIND_PTR, /* Likewise, on void *. */ 3157 SPECPDL_UNWIND_PTR, /* Likewise, on void *. */
3158 SPECPDL_UNWIND_INT, /* Likewise, on int. */ 3158 SPECPDL_UNWIND_INT, /* Likewise, on int. */
3159 SPECPDL_UNWIND_INTMAX, /* Likewise, on intmax_t. */
3159 SPECPDL_UNWIND_EXCURSION, /* Likewise, on an execursion. */ 3160 SPECPDL_UNWIND_EXCURSION, /* Likewise, on an execursion. */
3160 SPECPDL_UNWIND_VOID, /* Likewise, with no arg. */ 3161 SPECPDL_UNWIND_VOID, /* Likewise, with no arg. */
3161 SPECPDL_BACKTRACE, /* An element of the backtrace. */ 3162 SPECPDL_BACKTRACE, /* An element of the backtrace. */
@@ -3193,6 +3194,11 @@ union specbinding
3193 } unwind_int; 3194 } unwind_int;
3194 struct { 3195 struct {
3195 ENUM_BF (specbind_tag) kind : CHAR_BIT; 3196 ENUM_BF (specbind_tag) kind : CHAR_BIT;
3197 void (*func) (intmax_t);
3198 intmax_t arg;
3199 } unwind_intmax;
3200 struct {
3201 ENUM_BF (specbind_tag) kind : CHAR_BIT;
3196 Lisp_Object marker, window; 3202 Lisp_Object marker, window;
3197 } unwind_excursion; 3203 } unwind_excursion;
3198 struct { 3204 struct {
@@ -4118,6 +4124,7 @@ extern void record_unwind_protect (void (*) (Lisp_Object), Lisp_Object);
4118extern void record_unwind_protect_array (Lisp_Object *, ptrdiff_t); 4124extern void record_unwind_protect_array (Lisp_Object *, ptrdiff_t);
4119extern void record_unwind_protect_ptr (void (*) (void *), void *); 4125extern void record_unwind_protect_ptr (void (*) (void *), void *);
4120extern void record_unwind_protect_int (void (*) (int), int); 4126extern void record_unwind_protect_int (void (*) (int), int);
4127extern void record_unwind_protect_intmax (void (*) (intmax_t), intmax_t);
4121extern void record_unwind_protect_void (void (*) (void)); 4128extern void record_unwind_protect_void (void (*) (void));
4122extern void record_unwind_protect_excursion (void); 4129extern void record_unwind_protect_excursion (void);
4123extern void record_unwind_protect_nothing (void); 4130extern void record_unwind_protect_nothing (void);