8000 gh-94512: Fix forced arg format in AC-processed multiprocessing (GH-9… · python/cpython@670f7f1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 670f7f1

Browse files
authored
gh-94512: Fix forced arg format in AC-processed multiprocessing (GH-94517)
1 parent 9b50f76 commit 670f7f1

File tree

2 files changed

+33
-7
lines changed

2 files changed

+33
-7
lines changed

Modules/_multiprocessing/clinic/multiprocessing.c.h

Lines changed: 24 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Modules/_multiprocessing/multiprocessing.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,16 @@ class HANDLE_converter(CConverter):
1414
type = "HANDLE"
1515
format_unit = '"F_HANDLE"'
1616
17+
def parse_arg(self, argname, displayname):
18+
return """
19+
{paramname} = PyLong_AsVoidPtr({argname});
20+
if (!{paramname} && PyErr_Occurred()) {{{{
21+
goto exit;
22+
}}}}
23+
""".format(argname=argname, paramname=self.parser_name)
24+
1725
[python start generated code]*/
18-
/*[python end generated code: output=da39a3ee5e6b4b0d input=9fad6080b79ace91]*/
26+
/*[python end generated code: output=da39a3ee5e6b4b0d input=3e537d244034affb]*/
1927

2028
/*[clinic input]
2129
module _multiprocessing

0 commit comments

Comments
 (0)
0