Skip to content

Commit

Permalink
gh-95417: Quick fix for "ULONG_PTR differs in levels of indirection f…
Browse files Browse the repository at this point in the history
…rom void *" (GH-95538)
  • Loading branch information
arhadthedev authored Aug 1, 2022
1 parent c0cd790 commit 858c9a5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Modules/clinic/overlapped.c.h

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

10 changes: 9 additions & 1 deletion Modules/overlapped.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,21 @@ class HANDLE_converter(pointer_converter):
class ULONG_PTR_converter(pointer_converter):
type = 'ULONG_PTR'
def parse_arg(self, argname, displayname):
return """
{paramname} = (uintptr_t)PyLong_AsVoidPtr({argname});
if (!{paramname} && PyErr_Occurred()) {{{{
goto exit;
}}}}
""".format(argname=argname, paramname=self.parser_name)
class DWORD_converter(unsigned_long_converter):
type = 'DWORD'
class BOOL_converter(int_converter):
type = 'BOOL'
[python start generated code]*/
/*[python end generated code: output=da39a3ee5e6b4b0d input=a19133a9e14fae9c]*/
/*[python end generated code: output=da39a3ee5e6b4b0d input=8a07ea3018f4cec8]*/

/*[clinic input]
module _overlapped
Expand Down

0 comments on commit 858c9a5

Please sign in to comment.