projects/guix·blob javascript-team · refs

30 lines · 881 B

1commit 623e95394e0e62e7f9ced2104b786d21e9c0bf53
2Author: Đoàn Trần Công Danh <[email protected]>
3Date: Wed Sep 21 22:21:58 2022 +0700
4
5 cpython: fix build with Python 3.11
6
7 Python 3.11 moves longintrepr.h into cpython sub-directory.
8 However, in this version, longintrepr.h is always included.
9
10diff --git a/src/cpython.h b/src/cpython.h
11index 11e64fa6..bcfa406f 100644
12--- a/src/cpython.h
13+++ b/src/cpython.h
14@@ -24,9 +24,15 @@
15 * Sven Trenkel <collectd at semidefinite.de>
16 **/
17
18+#include <Python.h>
19 /* Some python versions don't include this by default. */
20-
21+#if PY_VERSION_HEX < 0x030B0000
22+/*
23+ * Python 3.11 move longintrepr.h to cpython/longintrepr.h
24+ * And it's always included
25+ */
26 #include <longintrepr.h>
27+#endif /* PY_VERSION_HEX < 0x030B0000 */
28
29 /* These two macros are basically Py_BEGIN_ALLOW_THREADS and
30 * Py_BEGIN_ALLOW_THREADS