diff options
| -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)) |
