summaryrefslogtreecommitdiff
path: root/src/lisp.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2019-07-21 12:31:51 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2019-07-21 12:32:16 -0700
commit5d4dd552c29279b8a9e6ed269a2dc3afc36f73b9 (patch)
tree95edeff83e756072c35f974f6271ba8c191d8436 /src/lisp.h
parentd02c2f7f6507105605ed0596a7e26acd5b3b8122 (diff)
downloademacs-5d4dd552c29279b8a9e6ed269a2dc3afc36f73b9.tar.gz
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 {
Its elements are potential Lisp_Objects. */
SPECPDL_UNWIND_PTR, /* Likewise, on void *. */
SPECPDL_UNWIND_INT, /* Likewise, on int. */
+ SPECPDL_UNWIND_INTMAX, /* Likewise, on intmax_t. */
SPECPDL_UNWIND_EXCURSION, /* Likewise, on an execursion. */
SPECPDL_UNWIND_VOID, /* Likewise, with no arg. */
SPECPDL_BACKTRACE, /* An element of the backtrace. */
@@ -3193,6 +3194,11 @@ union specbinding
} unwind_int;
struct {
ENUM_BF (specbind_tag) kind : CHAR_BIT;
+ void (*func) (intmax_t);
+ intmax_t arg;
+ } unwind_intmax;
+ struct {
+ ENUM_BF (specbind_tag) kind : CHAR_BIT;
Lisp_Object marker, window;
} unwind_excursion;
struct {
@@ -4118,6 +4124,7 @@ extern void record_unwind_protect (void (*) (Lisp_Object), Lisp_Object);
extern void record_unwind_protect_array (Lisp_Object *, ptrdiff_t);
extern void record_unwind_protect_ptr (void (*) (void *), void *);
extern void record_unwind_protect_int (void (*) (int), int);
+extern void record_unwind_protect_intmax (void (*) (intmax_t), intmax_t);
extern void record_unwind_protect_void (void (*) (void));
extern void record_unwind_protect_excursion (void);
extern void record_unwind_protect_nothing (void);