summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Madden <jamadden@gmail.com>2022-10-28 15:50:25 -0500
committerJason Madden <jamadden@gmail.com>2022-10-28 15:50:25 -0500
commitd7c85b3bf52390815b9dfb8547c64751a273858b (patch)
tree3ca0b86b48141e74c7b149fa5608f51a078616e9
parent8ab940786f29d01dbcc7df2ef24940d27389e7a9 (diff)
downloadgreenlet-d7c85b3bf52390815b9dfb8547c64751a273858b.tar.gz
Only for non-windows.
-rw-r--r--src/greenlet/greenlet.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/greenlet/greenlet.cpp b/src/greenlet/greenlet.cpp
index 64d7db4..4e46d42 100644
--- a/src/greenlet/greenlet.cpp
+++ b/src/greenlet/greenlet.cpp
@@ -404,7 +404,7 @@ struct ThreadState_DestroyWithGIL
}
};
-#if PY_VERSION_HEX >= 0x30800A0 && PY_VERSION_HEX < 0x3090000
+#if (PY_VERSION_HEX >= 0x30800A0 && PY_VERSION_HEX < 0x3090000) && !(defined(_WIN32) || defined(WIN32))
// XXX: From Python 3.8a3 [1] up until Python 3.9a6 [2][3],
// ``Py_AddPendingCall`` would try to produce a Python exception if
// the interpreter was in the beginning of shutting down when this
@@ -441,7 +441,9 @@ struct ThreadState_DestroyWithGIL
// fine, but on Ubuntu jammy with 3.8 from ppa:deadsnakes or GitHub
// Actions 3.8 (I think it's Ubuntu 18.04), they con't be used; at
// least, I couldn't get them to work). So we need to define the
-// structures and _PyRuntime data member ourself.
+// structures and _PyRuntime data member ourself. Yet more
+// unfortunately, _PyRuntime won't link on Windows, so we can only do
+// this on other platforms.
//
// [1] https://github.com/python/cpython/commit/842a2f07f2f08a935ef470bfdaeef40f87490cfc
// [2] https://github.com/python/cpython/commit/cfc3c2f8b34d3864717ab584c5b6c260014ba55a