fix types of ansi_c/sysio to more closely match C ABI

also fixes some instances of using C library functions when there are
nim alternatives available
This commit is contained in:
Jacek Sieka 2016-06-05 12:03:20 +08:00
commit 64b0485207
15 changed files with 173 additions and 203 deletions

View file

@ -152,10 +152,10 @@ proc writeCell(msg: cstring, c: PCell) =
var kind = -1
if c.typ != nil: kind = ord(c.typ.kind)
when leakDetector:
c_fprintf(c_stdout, "[GC] %s: %p %d rc=%ld from %s(%ld)\n",
c_fprintf(stdout, "[GC] %s: %p %d rc=%ld from %s(%ld)\n",
msg, c, kind, c.refcount shr rcShift, c.filename, c.line)
else:
c_fprintf(c_stdout, "[GC] %s: %p %d rc=%ld; color=%ld\n",
c_fprintf(stdout, "[GC] %s: %p %d rc=%ld; color=%ld\n",
msg, c, kind, c.refcount shr rcShift, c.color)
template gcTrace(cell, state: expr): stmt {.immediate.} =