Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
build/pkgs/cython/patches/trashcan.patch: Update using cython/cython#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Nov 24, 2022
1 parent 8df4d8b commit 0e458db
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build/pkgs/cython/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.29.32.p1
0.29.32.p2
11 changes: 9 additions & 2 deletions build/pkgs/cython/patches/trashcan.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
See https://github.com/cython/cython/pull/2842

and https://github.com/cython/cython/pull/4475

commit c47c4ef735c4b7f1863b21bbe6f112b06c4aad05
Author: Jeroen Demeyer <J.Demeyer@UGent.be>
Date: Thu Feb 14 10:02:41 2019 +0100
Expand Down Expand Up @@ -128,7 +130,7 @@ diff --git a/Cython/Utility/ExtensionTypes.c b/Cython/Utility/ExtensionTypes.c
index 50d0e21..ca2adbe 100644
--- a/Cython/Utility/ExtensionTypes.c
+++ b/Cython/Utility/ExtensionTypes.c
@@ -74,6 +74,49 @@ static int __Pyx_PyType_Ready(PyTypeObject *t) {
@@ -74,6 +74,54 @@ static int __Pyx_PyType_Ready(PyTypeObject *t) {
return r;
}

Expand All @@ -140,7 +142,12 @@ index 50d0e21..ca2adbe 100644
+
+// This requires CPython version >= 2.7.4
+// (or >= 3.2.4 but we don't support such old Python 3 versions anyway)
+#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02070400
+#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03080000
+// https://github.com/python/cpython/pull/11841 merged so Cython reimplementation
+// is no longer necessary
+#define __Pyx_TRASHCAN_BEGIN Py_TRASHCAN_BEGIN
+#define __Pyx_TRASHCAN_END Py_TRASHCAN_END
+#elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02070400
+#define __Pyx_TRASHCAN_BEGIN_CONDITION(op, cond) \
+ do { \
+ PyThreadState *_tstate = NULL; \
Expand Down

0 comments on commit 0e458db

Please sign in to comment.