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

@ -51,7 +51,7 @@ proc inbox*[TIn, TOut](self: PActor[TIn, TOut]): ptr TChannel[TIn] =
## gets a pointer to the associated inbox of the actor `self`.
result = addr(self.i)
proc running*[TIn, TOut](a: PActor[TIn, TOut]) =
proc running*[TIn, TOut](a: PActor[TIn, TOut]): bool =
## returns true if the actor `a` is running.
result = running(a.t)

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