Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Lib/test/libregrtest/win_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,14 @@ def close(self, kill=True):
def __del__(self,
# localize module access to prevent shutdown errors
_wait=_winapi.WaitForSingleObject,
_timeout=_winapi.INFINITE,
_close=_winapi.CloseHandle,
_signal=_overlapped.SetEvent):
if self._running is not None:
# tell the update thread to quit
_signal(self._running)
# wait for the update thread to signal done
_wait(self._stopped, -1)
_wait(self._stopped, _timeout)
# cleanup events
_close(self._running)
_close(self._stopped)
Expand Down
6 changes: 4 additions & 2 deletions Modules/_winapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ create_converter('LPSECURITY_ATTRIBUTES', '" F_POINTER "')
create_converter('LPCVOID', '" F_POINTER "')

create_converter('BOOL', 'i') # F_BOOL used previously (always 'i')
create_converter('DWORD', 'k') # F_DWORD is always "k" (which is much shorter)
create_converter('LPCTSTR', 's')
create_converter('UINT', 'I') # F_UINT used previously (always 'I')

Expand All @@ -210,6 +209,9 @@ class HANDLE_return_converter(CReturnConverter):
data.return_conversion.append(
'return_value = HANDLE_TO_PYNUM(_return_value);\n')

class DWORD_converter(unsigned_long_converter):
type = 'DWORD'

class DWORD_return_converter(CReturnConverter):
type = 'DWORD'

Expand All @@ -228,7 +230,7 @@ class LPVOID_return_converter(CReturnConverter):
data.return_conversion.append(
'return_value = HANDLE_TO_PYNUM(_return_value);\n')
[python start generated code]*/
/*[python end generated code: output=da39a3ee5e6b4b0d input=011ee0c3a2244bfe]*/
/*[python end generated code: output=da39a3ee5e6b4b0d input=84937c7280ba273d]*/

#include "clinic/_winapi.c.h"

Expand Down
59 changes: 31 additions & 28 deletions Modules/clinic/_winapi.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.