diff options
Diffstat (limited to 'Objects/funcobject.c')
| -rw-r--r-- | Objects/funcobject.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Objects/funcobject.c b/Objects/funcobject.c index a65c1f4..b6ffc2a 100644 --- a/Objects/funcobject.c +++ b/Objects/funcobject.c @@ -741,6 +741,10 @@ cm_descr_get(PyObject *self, PyObject *obj, PyObject *type) } if (type == NULL) type = (PyObject *)(Py_TYPE(obj)); + if (Py_TYPE(cm->cm_callable)->tp_descr_get != NULL) { + return Py_TYPE(cm->cm_callable)->tp_descr_get(cm->cm_callable, type, + NULL); + } return PyMethod_New(cm->cm_callable, type); } |
