mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-111178: Change Argument Clinic signature for @classmethod
(#131157)
Use "PyObject*", instead of "PyTypeObject*", for `@classmethod` functions to fix an undefined behavior.
This commit is contained in:
parent
de2f7da77d
commit
061da44bac
22 changed files with 164 additions and 62 deletions
|
@ -1307,8 +1307,8 @@ Convert number to a complex floating-point number.
|
|||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
complex_from_number(PyTypeObject *type, PyObject *number)
|
||||
/*[clinic end generated code: output=658a7a5fb0de074d input=3f8bdd3a2bc3facd]*/
|
||||
complex_from_number_impl(PyTypeObject *type, PyObject *number)
|
||||
/*[clinic end generated code: output=7248bb593e1871e1 input=3f8bdd3a2bc3facd]*/
|
||||
{
|
||||
if (PyComplex_CheckExact(number) && type == &PyComplex_Type) {
|
||||
Py_INCREF(number);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue