Skip to content

Commit

Permalink
XXX Revert "address review: use type_module()"
Browse files Browse the repository at this point in the history
This reverts commit 777bc8d.
  • Loading branch information
skirpichev committed Nov 2, 2024
1 parent d0f5bb0 commit e20339b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Objects/typeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -7611,7 +7611,7 @@ type_add_method(PyTypeObject *type, PyMethodDef *meth)
descr = PyDescr_NewClassMethod(type, meth);
}
else if (meth->ml_flags & METH_STATIC) {
PyObject *mod = type_module(type);
PyObject *mod = PyObject_GetAttr((PyObject*)type, &_Py_ID(__module__));
PyErr_Clear();
PyObject *cfunc = PyCFunction_NewEx(meth, (PyObject*)type, mod);
Py_XDECREF(mod);
Expand Down

0 comments on commit e20339b

Please sign in to comment.