summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2013-01-14 15:07:50 +0400
committerDmitry Antipov <dmantipov@yandex.ru>2013-01-14 15:07:50 +0400
commit9d5a1260b69af8ccb708a3e29b85aa1bf59f8405 (patch)
tree96ad9563155d96eaede468ecce920f38527222ce
parent73ebd38f16c4799b657e501f188e9f3a3eca7805 (diff)
downloademacs-9d5a1260b69af8ccb708a3e29b85aa1bf59f8405.tar.gz
Fix compilation with GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE.
* eval.c (eval_sub): Protect `form' from being GCed before its car and cdr becomes protected with the backtrace entry.
-rw-r--r--src/ChangeLog6
-rw-r--r--src/eval.c3
2 files changed, 9 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 098d3ae027e..2445027edd5 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,11 @@
2013-01-14 Dmitry Antipov <dmantipov@yandex.ru>
+ Fix compilation with GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE.
+ * eval.c (eval_sub): Protect `form' from being GCed before its
+ car and cdr becomes protected with the backtrace entry.
+
+2013-01-14 Dmitry Antipov <dmantipov@yandex.ru>
+
Make Lisp_Save_Value more versatile storage for up to four objects.
* lisp.h (toplevel): Enumeration to describe types of saved objects.
(struct Lisp_Save_Value): New layout. Adjust comments.
diff --git a/src/eval.c b/src/eval.c
index c49f8e85c2f..030bf14bcea 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1931,7 +1931,10 @@ eval_sub (Lisp_Object form)
return form;
QUIT;
+
+ GCPRO1 (form);
maybe_gc ();
+ UNGCPRO;
if (++lisp_eval_depth > max_lisp_eval_depth)
{