diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-02-16 08:36:02 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-02-17 19:48:53 +0000 |
commit | 383ce3a891c144cee0943ac5613b9d4f6f13531d (patch) | |
tree | 6b4b7205de1866fa6fe8ca4a90a3f920a65b4c0d | |
parent | b2eabfd3964833bdf5afab5eacb16f7c7636e3f8 (diff) |
shiboken6: Output new type flags in the debug operator
Change-Id: Id3bfad4b77472050ba6284b117f2b04a1467de03
Reviewed-by: Christian Tismer <tismer@stackless.com>
(cherry picked from commit aaceba1a73fcab34c3e75b3bee63b793cc96a62c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | sources/shiboken6/libshiboken/helper.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sources/shiboken6/libshiboken/helper.cpp b/sources/shiboken6/libshiboken/helper.cpp index aa8d28c38..4f46378e0 100644 --- a/sources/shiboken6/libshiboken/helper.cpp +++ b/sources/shiboken6/libshiboken/helper.cpp @@ -84,6 +84,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'; } |