diff --git a/Modules/clinic/overlapped.c.h b/Modules/clinic/overlapped.c.h index 1c216633eb95f0..a8dc9b2a5de65f 100644 --- a/Modules/clinic/overlapped.c.h +++ b/Modules/clinic/overlapped.c.h @@ -37,7 +37,7 @@ _overlapped_CreateIoCompletionPort(PyObject *module, PyObject *const *args, Py_s if (!ExistingCompletionPort && PyErr_Occurred()) { goto exit; } - CompletionKey = (uintptr_t)PyLong_AsVoidPtr(args[2]); + CompletionKey = PyLong_AsUintptr_t(args[2]); if (!CompletionKey && PyErr_Occurred()) { goto exit; } @@ -124,7 +124,7 @@ _overlapped_PostQueuedCompletionStatus(PyObject *module, PyObject *const *args, if (!_PyLong_UnsignedLong_Converter(args[1], &NumberOfBytes)) { goto exit; } - CompletionKey = (uintptr_t)PyLong_AsVoidPtr(args[2]); + CompletionKey = PyLong_AsUintptr_t(args[2]); if (!CompletionKey && PyErr_Occurred()) { goto exit; } @@ -1225,4 +1225,4 @@ _overlapped_Overlapped_WSARecvFromInto(OverlappedObject *self, PyObject *const * return return_value; } -/*[clinic end generated code: output=edd05b7a6c9c3aac input=a9049054013a1b77]*/ +/*[clinic end generated code: output=c92ad5ebfe07371f input=a9049054013a1b77]*/ diff --git a/Modules/overlapped.c b/Modules/overlapped.c index 369b1beae84e3f..a36cdf70782c64 100644 --- a/Modules/overlapped.c +++ b/Modules/overlapped.c @@ -54,7 +54,7 @@ class ULONG_PTR_converter(pointer_converter): def parse_arg(self, argname, displayname): return """ - {paramname} = (uintptr_t)PyLong_AsVoidPtr({argname}); + {paramname} = PyLong_AsUintptr_t({argname}); if (!{paramname} && PyErr_Occurred()) {{{{ goto exit; }}}} @@ -66,7 +66,7 @@ class DWORD_converter(unsigned_long_converter): class BOOL_converter(int_converter): type = 'BOOL' [python start generated code]*/ -/*[python end generated code: output=da39a3ee5e6b4b0d input=8a07ea3018f4cec8]*/ +/*[python end generated code: output=da39a3ee5e6b4b0d input=4f13bfc8e0686699]*/ /*[clinic input] module _overlapped