mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-46764: Fix wrapping bound method with @classmethod (#31367)
This commit is contained in:
parent
d1b2e989be
commit
a918589578
3 changed files with 11 additions and 8 deletions
|
@ -321,13 +321,6 @@ method_traverse(PyMethodObject *im, visitproc visit, void *arg)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
method_descr_get(PyObject *meth, PyObject *obj, PyObject *cls)
|
||||
{
|
||||
Py_INCREF(meth);
|
||||
return meth;
|
||||
}
|
||||
|
||||
PyTypeObject PyMethod_Type = {
|
||||
PyVarObject_HEAD_INIT(&PyType_Type, 0)
|
||||
.tp_name = "method",
|
||||
|
@ -348,7 +341,6 @@ PyTypeObject PyMethod_Type = {
|
|||
.tp_methods = method_methods,
|
||||
.tp_members = method_memberlist,
|
||||
.tp_getset = method_getset,
|
||||
.tp_descr_get = method_descr_get,
|
||||
.tp_new = method_new,
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue