summaryrefslogtreecommitdiff
path: root/Objects/typeobject.c
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2002-12-09 22:56:13 +0000
committerTim Peters <tim.peters@gmail.com>2002-12-09 22:56:13 +0000
commitbca1cbc6f895c7f9f003877b1cfc0c649387ae1c (patch)
treedff6bc8f6b8f2c8eab0a06e4921d7e6521f0a396 /Objects/typeobject.c
parentc7e3c5e3062295d4c3a7d8a41e4c2246e7476194 (diff)
downloadcpython-git-bca1cbc6f895c7f9f003877b1cfc0c649387ae1c.tar.gz
SF 548651: Fix the METH_CLASS implementation.
Most of these patches are from Thomas Heller, with long lines folded by Tim. The change to test_descr.py is from Guido. See the bug report. Not a bugfix candidate -- METH_CLASS is new in 2.3.
Diffstat (limited to 'Objects/typeobject.c')
-rw-r--r--Objects/typeobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 0b7f00d259..193b0cc1bc 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -2435,7 +2435,7 @@ add_methods(PyTypeObject *type, PyMethodDef *meth)
"method cannot be both class and static");
return -1;
}
- descr = create_specialmethod(meth, PyClassMethod_New);
+ descr = PyDescr_NewClassMethod(type, meth);
}
else if (meth->ml_flags & METH_STATIC) {
descr = create_specialmethod(meth, PyStaticMethod_New);