diff options
author | elpres <elpres@users.noreply.github.com> | 2015-01-30 09:46:35 +0100 |
---|---|---|
committer | elpres <elpres@users.noreply.github.com> | 2015-01-30 09:46:35 +0100 |
commit | 7bf971fa1d4a18fdab4a82bec338324f587c7195 (patch) | |
tree | eb05dcf175e774962614223ddc9c2ef0f7277335 /lib/wrappers | |
parent | c7543652e67aea77dcda3a67c48efb9f76488140 (diff) | |
download | Nim-7bf971fa1d4a18fdab4a82bec338324f587c7195.tar.gz |
Same types for chars as in zlib.h
zlib sets the return value to -1 to communicate errors, which won't work if the parameter type is 'char'. Also, one routine was missing. Source: http://www.zlib.net/manual.html
Diffstat (limited to 'lib/wrappers')
-rw-r--r-- | lib/wrappers/zip/zlib.nim | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/wrappers/zip/zlib.nim b/lib/wrappers/zip/zlib.nim index e3530d566..b727b8428 100644 --- a/lib/wrappers/zip/zlib.nim +++ b/lib/wrappers/zip/zlib.nim @@ -119,9 +119,10 @@ proc gzputs*(thefile: GzFile, s: Pbytef): int32{.cdecl, dynlib: libz, importc: "gzputs".} proc gzgets*(thefile: GzFile, buf: Pbytef, length: int32): Pbytef{.cdecl, dynlib: libz, importc: "gzgets".} -proc gzputc*(thefile: GzFile, c: char): char{.cdecl, dynlib: libz, +proc gzputc*(thefile: GzFile, c: int): int{.cdecl, dynlib: libz, importc: "gzputc".} -proc gzgetc*(thefile: GzFile): char{.cdecl, dynlib: libz, importc: "gzgetc".} +proc gzgetc*(thefile: GzFile): int{.cdecl, dynlib: libz, importc: "gzgetc".} +proc gzungetc*(c: int, thefile: GzFile): int{.cdecl, dynlib: libz, importc: "gzungetc".} proc gzflush*(thefile: GzFile, flush: int32): int32{.cdecl, dynlib: libz, importc: "gzflush".} proc gzseek*(thefile: GzFile, offset: ZOffT, whence: int32): ZOffT{.cdecl, |