bugfix: 'defined/compiles' open an implicit mixin scope in generics

This commit is contained in:
Araq 2012-09-18 16:27:02 +02:00
commit 4892d6929a
4 changed files with 15 additions and 8 deletions

View file

@ -169,12 +169,14 @@ var
disabled: int
proc disableProfiling*() =
atomicDec disabled
system.profilerHook = nil
when defined(system.TStackTrace):
atomicDec disabled
system.profilerHook = nil
proc enableProfiling*() =
if atomicInc(disabled) >= 0:
system.profilerHook = hook
when defined(system.TStackTrace):
if atomicInc(disabled) >= 0:
system.profilerHook = hook
when defined(system.TStackTrace):
system.profilerHook = hook