diff --git a/vthreading.vp b/vthreading.vp index 954b228..e7eebb3 100644 --- a/vthreading.vp +++ b/vthreading.vp @@ -1,4 +1,3 @@ -import t, c from stdint import * from w32.win32base import * from w32.win32process import CreateThread, GetExitCodeThread, GetCurrentThreadId, TlsAlloc, TlsFree, TlsGetValue, TlsSetValue @@ -43,7 +42,7 @@ class Thread: def start(self): if self.started: return - self.handle = CreateThread(NULL, 0, self.target, self.arg, 0, c.Addr(self.thread_id)) + self.handle = CreateThread(NULL, 0, self.target, self.arg, 0, &self.thread_id) self.started = TRUE def join(self, timeout_ms: ULONG = INFINITE) -> BOOL: @@ -60,7 +59,7 @@ class Thread: def get_exit_code(self) -> ULONG: code: ULONG = 0 - GetExitCodeThread(self.handle, c.Addr(code)) + GetExitCodeThread(self.handle, &code) return code def close(self):