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:
parent
79226e2c60
commit
3a52e0f362
4 changed files with 20 additions and 12 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue