diff options
Diffstat (limited to 'unwind_prot.c')
-rw-r--r-- | unwind_prot.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/unwind_prot.c b/unwind_prot.c index 664e3a9b..5703777f 100644 --- a/unwind_prot.c +++ b/unwind_prot.c @@ -108,21 +108,13 @@ uwp_init () } /* Run a function without interrupts. This relies on the fact that the - FUNCTION cannot change the value of interrupt_immediately. (I.e., does - not call QUIT (). */ + FUNCTION cannot call QUIT (). */ static void without_interrupts (function, arg1, arg2) VFunction *function; char *arg1, *arg2; { - int old_interrupt_immediately; - - old_interrupt_immediately = interrupt_immediately; - interrupt_immediately = 0; - (*function)(arg1, arg2); - - interrupt_immediately = old_interrupt_immediately; } /* Start the beginning of a region. */ @@ -349,6 +341,8 @@ unwind_protect_mem_internal (var, psize) size = *(int *) psize; allocated = size + offsetof (UNWIND_ELT, sv.v.desired_setting[0]); + if (allocated < sizeof (UNWIND_ELT)) + allocated = sizeof (UNWIND_ELT); elt = (UNWIND_ELT *)xmalloc (allocated); elt->head.next = unwind_protect_list; elt->head.cleanup = (Function *) restore_variable; |