From: Đoàn Trần Công Danh Date: Wed, 21 Sep 2022 15:21:58 +0000 (+0700) Subject: cpython: fix build with Python 3.11 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=623e95394e0e62e7f9ced2104b786d21e9c0bf53;p=thirdparty%2Fcollectd.git cpython: fix build with Python 3.11 Python 3.11 moves longintrepr.h into cpython sub-directory. However, in this version, longintrepr.h is always included. --- diff --git a/src/cpython.h b/src/cpython.h index 11e64fa62..bcfa406fe 100644 --- a/src/cpython.h +++ b/src/cpython.h @@ -24,9 +24,15 @@ * Sven Trenkel **/ +#include /* Some python versions don't include this by default. */ - +#if PY_VERSION_HEX < 0x030B0000 +/* + * Python 3.11 move longintrepr.h to cpython/longintrepr.h + * And it's always included + */ #include +#endif /* PY_VERSION_HEX < 0x030B0000 */ /* These two macros are basically Py_BEGIN_ALLOW_THREADS and * Py_BEGIN_ALLOW_THREADS