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

@ -36,7 +36,7 @@ proc copyDeepString(src: NimString): NimString {.inline.} =
if src != nil:
result = rawNewStringNoInit(src.len)
result.len = src.len
c_memcpy(result.data, src.data, src.len + 1)
copyMem(addr(result.data), addr(src.data), src.len + 1)
proc genericDeepCopyAux(dest, src: pointer, mt: PNimType) =
var