X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fio%2Fwindows%2Fhandle.cpp;h=e59de273a65ea07d3d42712f1d2394cdc0db018d;hb=292aed8e23ea543b089d5f2a73000de4640befe7;hp=5b1d93368f3386adeab823b1c67c121a1cbd3264;hpb=609c9a508cfdc7b42c46c4f21d17639204165a00;p=libs%2Fcore.git diff --git a/source/io/windows/handle.cpp b/source/io/windows/handle.cpp index 5b1d933..e59de27 100644 --- a/source/io/windows/handle.cpp +++ b/source/io/windows/handle.cpp @@ -5,13 +5,11 @@ namespace Msp { namespace IO { -Handle::operator const void *() const +void sys_set_blocking(Handle &, bool) { - return priv->handle!=INVALID_HANDLE_VALUE ? this : 0; } - -void sys_set_blocking(Handle &, bool) +void sys_set_inherit(Handle &, bool) { } @@ -35,7 +33,11 @@ unsigned sys_write(Handle &handle, const char *buf, unsigned size) void sys_close(Handle &handle) { - CloseHandle(*handle); + if(handle) + { + CloseHandle(*handle); + *handle = INVALID_HANDLE_VALUE; + } } } // namespace IO