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:
Victor Stinner
2025-03-12 17:42:07 +01:00
committed by GitHub
parent de2f7da77d
commit 061da44bac
22 changed files with 164 additions and 62 deletions

View File

@@ -3290,8 +3290,8 @@ as local time.
[clinic start generated code]*/
static PyObject *
datetime_date_fromtimestamp(PyTypeObject *type, PyObject *timestamp)
/*[clinic end generated code: output=fd045fda58168869 input=eabb3fe7f40491fe]*/
datetime_date_fromtimestamp_impl(PyTypeObject *type, PyObject *timestamp)
/*[clinic end generated code: output=59def4e32c028fb6 input=eabb3fe7f40491fe]*/
{
return date_fromtimestamp((PyObject *) type, timestamp);
}