Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2ed671b

Browse filesBrowse files
authored
gh-111178: Change Argument Clinic signature for @staticmethod (#131157) (#131159)
Use "PyObject*", instead of "void*", for `@staticmethod` functions to fix an undefined behavior.
1 parent dd6d24e commit 2ed671b
Copy full SHA for 2ed671b

File tree

Expand file treeCollapse file tree

5 files changed

+12
-9
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+12
-9
lines changed

‎Lib/test/clinic.test.c

Copy file name to clipboardExpand all lines: Lib/test/clinic.test.c
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5262,14 +5262,14 @@ static PyObject *
52625262
Test_static_method_impl();
52635263

52645264
static PyObject *
5265-
Test_static_method(void *null, PyObject *Py_UNUSED(ignored))
5265+
Test_static_method(PyObject *null, PyObject *Py_UNUSED(ignored))
52665266
{
52675267
return Test_static_method_impl();
52685268
}
52695269

52705270
static PyObject *
52715271
Test_static_method_impl()
5272-
/*[clinic end generated code: output=82524a63025cf7ab input=dae892fac55ae72b]*/
5272+
/*[clinic end generated code: output=9e401fb6ed56a4f3 input=dae892fac55ae72b]*/
52735273

52745274

52755275
/*[clinic input]

‎Objects/clinic/bytearrayobject.c.h

Copy file name to clipboardExpand all lines: Objects/clinic/bytearrayobject.c.h
+2-2Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Objects/clinic/bytesobject.c.h

Copy file name to clipboardExpand all lines: Objects/clinic/bytesobject.c.h
+2-2Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Objects/clinic/unicodeobject.c.h

Copy file name to clipboardExpand all lines: Objects/clinic/unicodeobject.c.h
+2-2Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Tools/clinic/libclinic/converters.py

Copy file name to clipboardExpand all lines: Tools/clinic/libclinic/converters.py
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1115,7 +1115,10 @@ def correct_name_for_self(
11151115
return "PyObject *", "self"
11161116
return "PyObject *", "module"
11171117
if f.kind is STATIC_METHOD:
1118-
return "void *", "null"
1118+
if parser:
1119+
return "PyObject *", "null"
1120+
else:
1121+
return "void *", "null"
11191122
if f.kind == CLASS_METHOD:
11201123
if parser:
11211124
return "PyObject *", "type"

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.