From c82f98a8837cd92af9c6104514128a58b4b6f3fd Mon Sep 17 00:00:00 2001 From: Dmitry Shachnev Date: Sat, 4 Jan 2025 21:20:12 +0300 Subject: [PATCH] Use public version of PyLong_AsInt for Python >= 3.13 Forwarded: no Gbp-Pq: Name Use-public-version-of-PyLong_AsInt-for-Python-3.13.patch --- sources/shiboken2/libshiboken/pep384impl.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/shiboken2/libshiboken/pep384impl.h b/sources/shiboken2/libshiboken/pep384impl.h index 440784e..323715b 100644 --- a/sources/shiboken2/libshiboken/pep384impl.h +++ b/sources/shiboken2/libshiboken/pep384impl.h @@ -183,6 +183,8 @@ LIBSHIBOKEN_API const char *PepType_GetNameStr(PyTypeObject *type); */ #ifdef Py_LIMITED_API LIBSHIBOKEN_API int _PepLong_AsInt(PyObject *); +#elif PY_VERSION_HEX >= 0x030D0000 +#define _PepLong_AsInt PyLong_AsInt #else #define _PepLong_AsInt _PyLong_AsInt #endif -- 2.30.2