summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
Diffstat (limited to 'Objects')
-rw-r--r--Objects/funcobject.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/Objects/funcobject.c b/Objects/funcobject.c
index 1bb2092..acd662c 100644
--- a/Objects/funcobject.c
+++ b/Objects/funcobject.c
@@ -775,6 +775,11 @@ cm_init(PyObject *self, PyObject *args, PyObject *kwds)
return 0;
}
+static PyMemberDef cm_memberlist[] = {
+ {"__func__", T_OBJECT, offsetof(classmethod, cm_callable), READONLY},
+ {NULL} /* Sentinel */
+};
+
PyDoc_STRVAR(classmethod_doc,
"classmethod(function) -> method\n\
\n\
@@ -825,7 +830,7 @@ PyTypeObject PyClassMethod_Type = {
0, /* tp_iter */
0, /* tp_iternext */
0, /* tp_methods */
- 0, /* tp_members */
+ cm_memberlist, /* tp_members */
0, /* tp_getset */
0, /* tp_base */
0, /* tp_dict */
@@ -925,6 +930,11 @@ sm_init(PyObject *self, PyObject *args, PyObject *kwds)
return 0;
}
+static PyMemberDef sm_memberlist[] = {
+ {"__func__", T_OBJECT, offsetof(staticmethod, sm_callable), READONLY},
+ {NULL} /* Sentinel */
+};
+
PyDoc_STRVAR(staticmethod_doc,
"staticmethod(function) -> method\n\
\n\
@@ -972,7 +982,7 @@ PyTypeObject PyStaticMethod_Type = {
0, /* tp_iter */
0, /* tp_iternext */
0, /* tp_methods */
- 0, /* tp_members */
+ sm_memberlist, /* tp_members */
0, /* tp_getset */
0, /* tp_base */
0, /* tp_dict */