diff options
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/alloc.c b/src/alloc.c index 50015808e59..aa9200f2ebb 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -5505,10 +5505,9 @@ staticpro (Lisp_Object const *varaddress) | |||
| 5505 | consing_until_gc to speed up maybe_gc when GC is inhibited. */ | 5505 | consing_until_gc to speed up maybe_gc when GC is inhibited. */ |
| 5506 | 5506 | ||
| 5507 | static void | 5507 | static void |
| 5508 | allow_garbage_collection (void *ptr) | 5508 | allow_garbage_collection (intmax_t consing) |
| 5509 | { | 5509 | { |
| 5510 | object_ct *p = ptr; | 5510 | consing_until_gc = consing; |
| 5511 | consing_until_gc = *p; | ||
| 5512 | garbage_collection_inhibited--; | 5511 | garbage_collection_inhibited--; |
| 5513 | } | 5512 | } |
| 5514 | 5513 | ||
| @@ -5516,8 +5515,7 @@ ptrdiff_t | |||
| 5516 | inhibit_garbage_collection (void) | 5515 | inhibit_garbage_collection (void) |
| 5517 | { | 5516 | { |
| 5518 | ptrdiff_t count = SPECPDL_INDEX (); | 5517 | ptrdiff_t count = SPECPDL_INDEX (); |
| 5519 | object_ct consing = consing_until_gc; | 5518 | record_unwind_protect_intmax (allow_garbage_collection, consing_until_gc); |
| 5520 | record_unwind_protect_ptr (allow_garbage_collection, &consing); | ||
| 5521 | garbage_collection_inhibited++; | 5519 | garbage_collection_inhibited++; |
| 5522 | consing_until_gc = OBJECT_CT_MAX; | 5520 | consing_until_gc = OBJECT_CT_MAX; |
| 5523 | return count; | 5521 | return count; |