summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeroen Demeyer <jdemeyer@cage.ugent.be>2017-06-07 13:15:50 +0200
committerJeroen Demeyer <jdemeyer@cage.ugent.be>2017-06-07 13:19:50 +0200
commit091657d270e422bfc7f27efa7d6944a5c3fd96f2 (patch)
tree4208aa24d91f063c0ad91e27bb8caaa72fba2380
parentAdd Cython patch to fix decorators with binding=True (diff)
Add Cython patch to fix method calls with binding=Trueu/jdemeyer/ticket/23155
-rw-r--r--build/pkgs/cython/patches/call_one_arg_no_cyfunction.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/build/pkgs/cython/patches/call_one_arg_no_cyfunction.patch b/build/pkgs/cython/patches/call_one_arg_no_cyfunction.patch
new file mode 100644
index 00000000..e78f342
--- /dev/null
+++ b/build/pkgs/cython/patches/call_one_arg_no_cyfunction.patch
@@ -0,0 +1,24 @@
+See https://github.com/cython/cython/pull/1728
+
+commit c20e8c19d6d2342cefc451c49363f69675992bb4
+Author: Jeroen Demeyer <jdemeyer@cage.ugent.be>
+Date: Wed Jun 7 12:19:29 2017 +0200
+
+ Don't use __Pyx_PyObject_CallMethO on cyfunctions
+
+diff --git a/Cython/Utility/ObjectHandling.c b/Cython/Utility/ObjectHandling.c
+index 35b5f2e..5e6ad51 100644
+--- a/Cython/Utility/ObjectHandling.c
++++ b/Cython/Utility/ObjectHandling.c
+@@ -1686,11 +1686,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObjec
+ return __Pyx_PyFunction_FastCall(func, &arg, 1);
+ }
+ #endif
+-#ifdef __Pyx_CyFunction_USED
+- if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
+-#else
+ if (likely(PyCFunction_Check(func))) {
+-#endif
+ if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
+ // fast and simple case that we are optimising for
+ return __Pyx_PyObject_CallMethO(func, arg);