mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +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
|
@ -1273,8 +1273,8 @@ Create a floating-point number from a hexadecimal string.
|
|||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
float_fromhex(PyTypeObject *type, PyObject *string)
|
||||
/*[clinic end generated code: output=46c0274d22b78e82 input=0407bebd354bca89]*/
|
||||
float_fromhex_impl(PyTypeObject *type, PyObject *string)
|
||||
/*[clinic end generated code: output=c54b4923552e5af5 input=0407bebd354bca89]*/
|
||||
{
|
||||
PyObject *result;
|
||||
double x;
|
||||
|
@ -1687,8 +1687,8 @@ Convert real number to a floating-point number.
|
|||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
float_from_number(PyTypeObject *type, PyObject *number)
|
||||
/*[clinic end generated code: output=bbcf05529fe907a3 input=1f8424d9bc11866a]*/
|
||||
float_from_number_impl(PyTypeObject *type, PyObject *number)
|
||||
/*[clinic end generated code: output=dda7e4466ab7068d input=1f8424d9bc11866a]*/
|
||||
{
|
||||
if (PyFloat_CheckExact(number) && type == &PyFloat_Type) {
|
||||
Py_INCREF(number);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue