summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
Diffstat (limited to 'Objects')
-rw-r--r--Objects/funcobject.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Objects/funcobject.c b/Objects/funcobject.c
index f24cbcf..426b8f4 100644
--- a/Objects/funcobject.c
+++ b/Objects/funcobject.c
@@ -474,6 +474,8 @@ cm_descr_get(PyObject *self, PyObject *obj, PyObject *type)
"uninitialized classmethod object");
return NULL;
}
+ if (type == NULL)
+ type = (PyObject *)(obj->ob_type);
return PyMethod_New(cm->cm_callable,
type, (PyObject *)(type->ob_type));
}