Revert removal of version check
authorDmitry Shachnev <mitya57@debian.org>
Wed, 4 Jan 2023 20:08:32 +0000 (00:08 +0400)
committerDmitry Shachnev <mitya57@debian.org>
Sun, 8 Jan 2023 20:06:53 +0000 (20:06 +0000)
It broke build without limited API.

Gbp-Pq: Name Revert-removal-of-version-check.patch

sources/shiboken2/libshiboken/pep384impl.cpp

index 66df0fd94a6d3140bfcc184f607fbe92e488cac3..a7233034ea3f4d433a70a9ed2b798875270931f0 100644 (file)
@@ -751,7 +751,7 @@ _Pep_PrivateMangle(PyObject *self, PyObject *name)
 #endif // IS_PY2
     Shiboken::AutoDecRef privateobj(PyObject_GetAttr(
         reinterpret_cast<PyObject *>(Py_TYPE(self)), Shiboken::PyMagicName::name()));
-#ifndef Py_LIMITED_API
+#if !defined(Py_LIMITED_API) && PY_VERSION_HEX < 0x03010000
     return _Py_Mangle(privateobj, name);
 #else
     // PYSIDE-1436: _Py_Mangle is no longer exposed; implement it always.