Skip to content

Commit 5e66da9

Browse files
committed
update cython patch
1 parent 7f7a493 commit 5e66da9

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

graalpython/lib-graalpython/patches/Cython/Cython-0.29.37.patch

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,33 @@ index aaa8a8e..152e9dc 100644
177177
Py_DECREF(ev);
178178
#else
179179
{
180+
@@ -715,7 +713,7 @@ PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, i
181+
182+
exc_state = &self->gi_exc_state;
183+
if (exc_state->exc_type) {
184+
- #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
185+
+ #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON || GRAALVM_PYTHON
186+
// FIXME: what to do in PyPy?
187+
#else
188+
// Generators always return to their most recent caller, not
189+
@@ -777,7 +775,7 @@ static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStr
190+
PyObject *exc_tb = exc_state->exc_traceback;
191+
192+
if (likely(exc_tb)) {
193+
-#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
194+
+#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON || GRAALVM_PYTHON
195+
// FIXME: what to do in PyPy?
196+
#else
197+
PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
198+
@@ -1250,7 +1248,7 @@ static void __Pyx_Coroutine_del(PyObject *self) {
199+
#else
200+
{PyObject *msg;
201+
char *cmsg;
202+
- #if CYTHON_COMPILING_IN_PYPY
203+
+ #if CYTHON_COMPILING_IN_PYPY || GRAALVM_PYTHON
204+
msg = NULL;
205+
cmsg = (char*) "coroutine was never awaited";
206+
#else
180207
diff --git a/Cython/Utility/CythonFunction.c b/Cython/Utility/CythonFunction.c
181208
index 93f577f..5dac1d7 100644
182209
--- a/Cython/Utility/CythonFunction.c
@@ -212,7 +239,7 @@ index cfff606..4a6a6ea 100644
212239
+ #undef CYTHON_USE_PYTYPE_LOOKUP
213240
+ #define CYTHON_USE_PYTYPE_LOOKUP 0
214241
+ #undef CYTHON_USE_ASYNC_SLOTS
215-
+ #define CYTHON_USE_ASYNC_SLOTS 0
242+
+ #define CYTHON_USE_ASYNC_SLOTS 1
216243
+ #undef CYTHON_USE_PYLIST_INTERNALS
217244
+ #define CYTHON_USE_PYLIST_INTERNALS 0
218245
+ #undef CYTHON_USE_UNICODE_INTERNALS

0 commit comments

Comments
 (0)