From 70c7348d3e502fa718fb56848fca8df608a085f7 Mon Sep 17 00:00:00 2001 From: Araq Date: Fri, 25 Jan 2019 09:49:01 +0100 Subject: [PATCH] gc:regions: undo the regression introducing changes --- lib/system/gc_regions.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/system/gc_regions.nim b/lib/system/gc_regions.nim index 3b908fb08c..59f68918fd 100644 --- a/lib/system/gc_regions.nim +++ b/lib/system/gc_regions.nim @@ -257,14 +257,14 @@ proc deallocAll*() = tlRegion.deallocAll() proc deallocOsPages(r: var MemRegion) = r.deallocAll() -template withScratchRegion*(body: untyped) = +when false: let obs = obstackPtr() try: body finally: setObstackPtr(obs) -when false: +template withScratchRegion*(body: untyped) = var scratch: MemRegion let oldRegion = tlRegion tlRegion = scratch