From 5045ad061319c2b2add65faea684a0bd0c9ac795 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 24 Feb 2022 07:43:09 +0100 Subject: Fix build with 3.10/Limited API Py_TPFLAGS_MAPPING and Py_TPFLAGS_SEQUENCE are not defined for Limited API. Amends aaceba1a73fcab34c3e75b3bee63b793cc96a62c. Change-Id: Ia279639e6a7b6e1a6c4b4a3c978b6be9ebe1183c Reviewed-by: Cristian Maureira-Fredes (cherry picked from commit 1995338b631dda248c311e179fcd4952cbb4b80e) Reviewed-by: Qt Cherry-pick Bot --- sources/shiboken6/libshiboken/helper.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/shiboken6/libshiboken/helper.cpp b/sources/shiboken6/libshiboken/helper.cpp index 4f46378e0..59b368271 100644 --- a/sources/shiboken6/libshiboken/helper.cpp +++ b/sources/shiboken6/libshiboken/helper.cpp @@ -97,10 +97,12 @@ static void formatPyTypeObject(const PyTypeObject *obj, std::ostream &str) str << " [immutabletype]"; if (obj->tp_flags & Py_TPFLAGS_DISALLOW_INSTANTIATION) str << " [disallow_instantiation]"; +# ifndef Py_LIMITED_API if (obj->tp_flags & Py_TPFLAGS_MAPPING) str << " [mapping]"; if (obj->tp_flags & Py_TPFLAGS_SEQUENCE) str << " [sequence]"; +# endif // !Py_LIMITED_API # endif // 3.10 # endif // 3.9 #endif // 3.8 -- cgit v1.2.3