Fix cast from HANDLE to descriptor in the WinAPI driver.

Avoids truncation to 32-bit for 64-bit builds. Also improves robustness of the directory watcher shutdown procedure.
This commit is contained in:
Sönke Ludwig 2018-03-03 18:31:26 +01:00
parent 79226e2c60
commit 3a52e0f362
4 changed files with 20 additions and 12 deletions

View file

@ -21,7 +21,7 @@ import eventcore.drivers.winapi.watchers;
import core.sys.windows.windows;
static assert(HANDLE.sizeof <= FD.BaseType.sizeof);
static assert(FD(cast(int)INVALID_HANDLE_VALUE) == FD.init);
static assert(FD(cast(size_t)INVALID_HANDLE_VALUE) == FD.init);
final class WinAPIEventDriver : EventDriver {