From 7bf971fa1d4a18fdab4a82bec338324f587c7195 Mon Sep 17 00:00:00 2001 From: elpres Date: Fri, 30 Jan 2015 09:46:35 +0100 Subject: 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 --- lib/wrappers/zip/zlib.nim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/wrappers') 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, -- cgit 1.4.1-2-gfad0