From af4eda46d1538b1da700a86588bdb94b0a4d1ff2 Mon Sep 17 00:00:00 2001 From: Zackery Spytz Date: Wed, 15 Jul 2020 12:43:00 -0600 Subject: [PATCH] bpo-40150: Fix mismatched argument in RegisterWaitForSingleObject() call (GH-19686) --- Modules/overlapped.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Modules/overlapped.c b/Modules/overlapped.c index 4f0ba85d798..5e7a1bbba76 100644 --- a/Modules/overlapped.c +++ b/Modules/overlapped.c @@ -293,7 +293,7 @@ struct PostCallbackData { }; static VOID CALLBACK -PostToQueueCallback(PVOID lpParameter, BOOL TimerOrWaitFired) +PostToQueueCallback(PVOID lpParameter, BOOLEAN TimerOrWaitFired) { struct PostCallbackData *p = (struct PostCallbackData*) lpParameter; @@ -335,8 +335,7 @@ _overlapped_RegisterWaitWithQueue_impl(PyObject *module, HANDLE Object, *pdata = data; if (!RegisterWaitForSingleObject( - &NewWaitObject, Object, (WAITORTIMERCALLBACK)PostToQueueCallback, - pdata, Milliseconds, + &NewWaitObject, Object, PostToQueueCallback, pdata, Milliseconds, WT_EXECUTEINWAITTHREAD | WT_EXECUTEONLYONCE)) { PyMem_RawFree(pdata);