Final compile fix attempt.

This commit is contained in:
Sönke Ludwig 2017-01-21 17:27:28 +01:00
parent 40595fe133
commit 74d9242086
No known key found for this signature in database
GPG key ID: D95E8DB493EE314C

View file

@ -1136,7 +1136,7 @@ final class PosixEventDriverEvents(Loop : PosixEventLoop) : EventDriverEvents {
Loop m_loop; Loop m_loop;
version (Windows) { version (Windows) {
static struct ES { static struct ES {
int refCount; uint refCount;
EventSlot slot; EventSlot slot;
} }
ES[EventID] m_events; ES[EventID] m_events;
@ -1239,23 +1239,23 @@ final class PosixEventDriverEvents(Loop : PosixEventLoop) : EventDriverEvents {
return true; return true;
} }
private EventSlot* getSlot(EventID id) private ref EventSlot getSlot(EventID id)
{ {
version (Windows) { version (Windows) {
assert(id in m_events, "Invalid event ID."); assert(id in m_events, "Invalid event ID.");
return &m_events[id].slot; return m_events[id].slot;
} else { } else {
assert(id < m_loop.m_fds.length, "Invalid event ID."); assert(id < m_loop.m_fds.length, "Invalid event ID.");
return &m_loop.m_fds[id].event; return m_loop.m_fds[id].event();
} }
} }
private ref int getRC(EventID id) private ref uint getRC(EventID id)
{ {
version (Windows) { version (Windows) {
return m_events[id].refCount; return m_events[id].refCount;
} else { } else {
return m_loop.m_fds[descriptor].common().refCount; return m_loop.m_fds[id].common.refCount;
} }
} }
} }