Use public version of PyLong_AsInt for Python >= 3.13
authorDmitry Shachnev <mitya57@debian.org>
Sat, 4 Jan 2025 18:20:12 +0000 (21:20 +0300)
committerGraham Inggs <ginggs@debian.org>
Sat, 25 Jan 2025 16:33:38 +0000 (16:33 +0000)
Forwarded: no

Gbp-Pq: Name Use-public-version-of-PyLong_AsInt-for-Python-3.13.patch

sources/shiboken2/libshiboken/pep384impl.h

index 440784e571d82766d5830f4a1bcf7b48e8058352..323715bfbdf652e6b6f80481ba677588ee1ee9b1 100644 (file)
@@ -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