aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorGerd Moellmann2001-01-09 13:43:43 +0000
committerGerd Moellmann2001-01-09 13:43:43 +0000
commit98edb5ff5fd06795c03513550216d49219f50550 (patch)
treefcd7e071b1a9b50879722a6db42715ded7ae18fe /src/alloc.c
parentfc46ca23fa8c204d7eb28b8f4457bbe135d1fa43 (diff)
downloademacs-98edb5ff5fd06795c03513550216d49219f50550.tar.gz
emacs-98edb5ff5fd06795c03513550216d49219f50550.zip
(Fgarbage_collect): Use a record_unwind_protect to
ensure that pop_message is called.
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/alloc.c b/src/alloc.c
index eba9d867c8c..8685496a515 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -1,5 +1,5 @@
1/* Storage allocation and gc for GNU Emacs Lisp interpreter. 1/* Storage allocation and gc for GNU Emacs Lisp interpreter.
2 Copyright (C) 1985, 86, 88, 93, 94, 95, 97, 98, 1999, 2000 2 Copyright (C) 1985, 86, 88, 93, 94, 95, 97, 98, 1999, 2000, 2001
3 Free Software Foundation, Inc. 3 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
@@ -3702,6 +3702,7 @@ Garbage collection happens automatically if you cons more than\n\
3702 register int i; 3702 register int i;
3703 int message_p; 3703 int message_p;
3704 Lisp_Object total[8]; 3704 Lisp_Object total[8];
3705 int count = BINDING_STACK_SIZE ();
3705 3706
3706 /* In case user calls debug_print during GC, 3707 /* In case user calls debug_print during GC,
3707 don't let that cause a recursive GC. */ 3708 don't let that cause a recursive GC. */
@@ -3709,6 +3710,7 @@ Garbage collection happens automatically if you cons more than\n\
3709 3710
3710 /* Save what's currently displayed in the echo area. */ 3711 /* Save what's currently displayed in the echo area. */
3711 message_p = push_message (); 3712 message_p = push_message ();
3713 record_unwind_protect (push_message_unwind, Qnil);
3712 3714
3713 /* Save a copy of the contents of the stack, for debugging. */ 3715 /* Save a copy of the contents of the stack, for debugging. */
3714#if MAX_SAVE_STACK > 0 3716#if MAX_SAVE_STACK > 0
@@ -3913,7 +3915,7 @@ Garbage collection happens automatically if you cons more than\n\
3913 message1_nolog ("Garbage collecting...done"); 3915 message1_nolog ("Garbage collecting...done");
3914 } 3916 }
3915 3917
3916 pop_message (); 3918 unbind_to (count, Qnil);
3917 3919
3918 total[0] = Fcons (make_number (total_conses), 3920 total[0] = Fcons (make_number (total_conses),
3919 make_number (total_free_conses)); 3921 make_number (total_free_conses));