aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2022-02-16 08:36:02 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2022-02-17 17:55:02 +0100
commitaaceba1a73fcab34c3e75b3bee63b793cc96a62c (patch)
treee114ec14a0685e486a0a9f52e701b5fe110768d2
parentaaf93cb34f30f36fa9622b29c21aaef29be02676 (diff)
shiboken6: Output new type flags in the debug operator
Pick-to: 6.2 Change-Id: Id3bfad4b77472050ba6284b117f2b04a1467de03 Reviewed-by: Christian Tismer <tismer@stackless.com>
-rw-r--r--sources/shiboken6/libshiboken/helper.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/sources/shiboken6/libshiboken/helper.cpp b/sources/shiboken6/libshiboken/helper.cpp
index 9bd0941ae..5acbe2d8e 100644
--- a/sources/shiboken6/libshiboken/helper.cpp
+++ b/sources/shiboken6/libshiboken/helper.cpp
@@ -85,6 +85,26 @@ static void formatPyTypeObject(const PyTypeObject *obj, std::ostream &str)
str << " [type]";
if (obj->tp_flags & Py_TPFLAGS_IS_ABSTRACT)
str << " [abstract]";
+#if PY_VERSION_HEX >= 0x03080000
+ if (obj->tp_flags & Py_TPFLAGS_METHOD_DESCRIPTOR)
+ str << " [method_descriptor]";
+# if PY_VERSION_HEX >= 0x03090000
+# ifndef Py_LIMITED_API
+ if (obj->tp_flags & Py_TPFLAGS_HAVE_VECTORCALL)
+ str << " [vectorcall]";
+# endif // !Py_LIMITED_API
+# if PY_VERSION_HEX >= 0x030A0000
+ if (obj->tp_flags & Py_TPFLAGS_IMMUTABLETYPE)
+ str << " [immutabletype]";
+ if (obj->tp_flags & Py_TPFLAGS_DISALLOW_INSTANTIATION)
+ str << " [disallow_instantiation]";
+ if (obj->tp_flags & Py_TPFLAGS_MAPPING)
+ str << " [mapping]";
+ if (obj->tp_flags & Py_TPFLAGS_SEQUENCE)
+ str << " [sequence]";
+# endif // 3.10
+# endif // 3.9
+#endif // 3.8
} else {
str << '0';
}