diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pure/osproc.nim | 6 | ||||
-rw-r--r-- | lib/windows/winlean.nim | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/pure/osproc.nim b/lib/pure/osproc.nim index 5839349fe..f90b310ea 100644 --- a/lib/pure/osproc.nim +++ b/lib/pure/osproc.nim @@ -441,7 +441,11 @@ when defined(Windows) and not defined(useNimRtl): handle: Handle atTheEnd: bool - proc hsClose(s: Stream) = discard # nothing to do here + proc hsClose(s: Stream) = + # xxx here + elsewhere: check instead of discard; ignoring errors leads to + # hard to track bugs + discard FileHandleStream(s).handle.closeHandle + proc hsAtEnd(s: Stream): bool = return FileHandleStream(s).atTheEnd proc hsReadData(s: Stream, buffer: pointer, bufLen: int): int = diff --git a/lib/windows/winlean.nim b/lib/windows/winlean.nim index 9beccc0eb..bd4cfdca7 100644 --- a/lib/windows/winlean.nim +++ b/lib/windows/winlean.nim @@ -31,6 +31,8 @@ type ULONG* = int32 PULONG* = ptr int WINBOOL* = int32 + ## `WINBOOL` uses opposite convention as posix, !=0 meaning success. + # xxx this should be distinct int32, distinct would make code less error prone DWORD* = int32 PDWORD* = ptr DWORD LPINT* = ptr int32 |