Merge branch 'devel' into sighashes

This commit is contained in:
Araq
2016-12-13 12:18:45 +01:00
9 changed files with 37 additions and 16 deletions

View File

@@ -20,7 +20,7 @@ const
alwaysCycleGC = defined(smokeCycles)
alwaysGC = defined(fulldebug) # collect after every memory
# allocation (for debugging)
leakDetector = false
leakDetector = defined(leakDetector)
overwriteFree = defined(nimBurnFree) # overwrite memory with 0xFF before free
trackAllocationSource = leakDetector

View File

@@ -336,8 +336,8 @@ proc open(f: var File, filehandle: FileHandle, mode: FileMode): bool =
f = c_fdopen(filehandle, FormatOpen[mode])
result = f != nil
proc setFilePos(f: File, pos: int64) =
if c_fseek(f, clong(pos), 0) != 0:
proc setFilePos(f: File, pos: int64, relativeTo: FileSeekPos = fspSet) =
if c_fseek(f, clong(pos), cint(relativeTo)) != 0:
raiseEIO("cannot set file position")
proc getFilePos(f: File): int64 =