diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-03-02 08:17:22 +0100 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-03-02 10:55:10 +0100 |
| commit | e77280f918b8ac83d19e36d4e664c92bb36aa6d6 (patch) | |
| tree | 6b70f4270445ad1d5e2431011c8afd3f373da9e9 | |
| parent | 55de6cc5ee5a7f1d628aa8d90f1ca8c127c7da42 (diff) | |
shiboken6: Output type objects in the debug operator
Pick-to: 6.2
Change-Id: Ibff23c6d4b8d467c19d00ceaba0a76e6d230216f
Reviewed-by: Christian Tismer <tismer@stackless.com>
| -rw-r--r-- | sources/shiboken6/libshiboken/helper.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sources/shiboken6/libshiboken/helper.cpp b/sources/shiboken6/libshiboken/helper.cpp index 656855724..55a64221b 100644 --- a/sources/shiboken6/libshiboken/helper.cpp +++ b/sources/shiboken6/libshiboken/helper.cpp @@ -247,6 +247,11 @@ static void formatPyUnicode(PyObject *obj, std::ostream &str) static void formatPyObjectHelper(PyObject *obj, std::ostream &str) { str << ", refs=" << obj->ob_refcnt << ", "; + if (PyType_Check(obj)) { + str << "type: "; + formatPyTypeObject(reinterpret_cast<PyTypeObject *>(obj), str); + return; + } formatPyTypeObject(obj->ob_type, str); str << ", "; if (PyLong_Check(obj)) |
