8000 gh-111178: Make slot functions in typeobject.c have compatible types by chrstphrchvz · Pull Request #112752 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-111178: Make slot functions in typeobject.c have compatible types #112752

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Dec 20, 2023
Prev Previous commit
Next Next commit
Make type_repr() compatible with reprfunc
  • Loading branch information
chrstphrchvz authored Dec 5, 2023
commit f98aee34a799e4ac1464fe8ec76ae92675df496e
5 changes: 3 additions & 2 deletions Objects/typeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -1597,8 +1597,9 @@ static PyGetSetDef type_getsets[] = {
};

static PyObject *
type_repr(PyTypeObject *type)
type_repr(PyObject *self)
{
PyTypeObject *type = (PyTypeObject *)self;
if (type->tp_name == NULL) {
// type_repr() called before the type is fully initialized
// by PyType_Ready().
Expand Down Expand Up @@ -5354,7 +5355,7 @@ PyTypeObject PyType_Type = {
0, /* tp_getattr */
0, /* tp_setattr */
0, /* tp_as_async */
(reprfunc)type_repr, /* tp_repr */
type_repr, /* tp_repr */
&type_as_number, /* tp_as_number */
0, /* tp_as_sequence */
0, /* tp_as_mapping */
Expand Down
0