diff options
author | Araq <rumpf_a@web.de> | 2012-09-18 16:27:02 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2012-09-18 16:27:02 +0200 |
commit | 4892d6929a5b60a004f5f9a12902ef4f7d37a9d8 (patch) | |
tree | 1999d4bc27ca07819e7645f45593772e1ab6a637 /lib | |
parent | a71c5f98ea92c4c9f96ffe9265600f9cc2b7a8ee (diff) | |
download | Nim-4892d6929a5b60a004f5f9a12902ef4f7d37a9d8.tar.gz |
bugfix: 'defined/compiles' open an implicit mixin scope in generics
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pure/actors.nim | 2 | ||||
-rw-r--r-- | lib/pure/nimprof.nim | 10 | ||||
-rwxr-xr-x | lib/system/ansi_c.nim | 2 |
3 files changed, 9 insertions, 5 deletions
diff --git a/lib/pure/actors.nim b/lib/pure/actors.nim index c6f277745..2d902debe 100644 --- a/lib/pure/actors.nim +++ b/lib/pure/actors.nim @@ -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) diff --git a/lib/pure/nimprof.nim b/lib/pure/nimprof.nim index 7a907d2ca..725a9d0f6 100644 --- a/lib/pure/nimprof.nim +++ b/lib/pure/nimprof.nim @@ -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 diff --git a/lib/system/ansi_c.nim b/lib/system/ansi_c.nim index 7c2c234c2..486f5dd26 100755 --- a/lib/system/ansi_c.nim +++ b/lib/system/ansi_c.nim @@ -66,6 +66,8 @@ proc c_ungetc(c: int, f: C_TextFileStar) {.importc: "ungetc", nodecl.} proc c_putc(c: Char, stream: C_TextFileStar) {.importc: "putc", nodecl.} proc c_fprintf(f: C_TextFileStar, frmt: CString) {. importc: "fprintf", nodecl, varargs.} +proc c_printf(frmt: CString) {. + importc: "printf", nodecl, varargs.} proc c_fopen(filename, mode: cstring): C_TextFileStar {. importc: "fopen", nodecl.} |