projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e1a600b
)
second try to fix classmethods
author
Stefan Behnel
<scoder@users.berlios.de>
Fri, 23 May 2008 20:31:27 +0000
(22:31 +0200)
committer
Stefan Behnel
<scoder@users.berlios.de>
Fri, 23 May 2008 20:31:27 +0000
(22:31 +0200)
Cython/Compiler/Symtab.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/Symtab.py
b/Cython/Compiler/Symtab.py
index ba2e9d8cc2e4b47e2e8d1a26b62431e489bb30bc..a5b1fd01c1f1d238758c827e6cc1e78151494c7c 100644
(file)
--- a/
Cython/Compiler/Symtab.py
+++ b/
Cython/Compiler/Symtab.py
@@
-1409,6
+1409,10
@@
static PyObject* __Pyx_Method_ClassMethod(PyObject *method) {
else if (PyMethod_Check(method)) { /* python classes */
return PyClassMethod_New(PyMethod_GET_FUNCTION(method));
}
+ else if (PyCFunction_Check(method)) {
+ return PyClassMethod_New(method);
+ }
+ printf("%s\\n", Py_TYPE(method)->tp_name);
PyErr_Format(PyExc_TypeError, "Class-level classmethod() can only be called on a method_descriptor or instance method.");
return NULL;
}