Skip to content
Snippets Groups Projects
Commit 32eefb60b31f authored by Stefan Behnel's avatar Stefan Behnel
Browse files

Revert "Always bind Cython functions"

This reverts commit 6677326025dcd3acfd4e1e2beabdc678c53dec19.
parent aa3cdffbcf74
Branches
No related tags found
No related merge requests found
......@@ -548,6 +548,21 @@
static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
{
__pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
Py_INCREF(func);
return func;
}
if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
if (type == NULL)
type = (PyObject *)(Py_TYPE(obj));
return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
}
if (obj == Py_None)
obj = NULL;
return __Pyx_PyMethod_New(func, obj, type);
}
......
......@@ -376,18 +376,6 @@
def meth(self): pass
class TestStaticmethod(object):
"""
>>> x = TestStaticmethod()
>>> x.staticmeth(42)
42
>>> x.staticmeth.__get__(42)()
42
"""
@staticmethod
def staticmeth(arg): return arg
cdef class TestOptimisedBuiltinMethod:
"""
>>> obj = TestOptimisedBuiltinMethod()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment