aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/PySide2/typesystem_templates.xml
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside2/PySide2/typesystem_templates.xml')
-rw-r--r--sources/pyside2/PySide2/typesystem_templates.xml5
1 files changed, 3 insertions, 2 deletions
diff --git a/sources/pyside2/PySide2/typesystem_templates.xml b/sources/pyside2/PySide2/typesystem_templates.xml
index 798d02dd..103d773c 100644
--- a/sources/pyside2/PySide2/typesystem_templates.xml
+++ b/sources/pyside2/PySide2/typesystem_templates.xml
@@ -314,11 +314,12 @@
<!-- templates for __repr__ -->
<template name="repr_code">
- QString format = QString().sprintf("%s(%REPR_FORMAT)", ((PyObject*)%PYSELF)->ob_type->tp_name, %REPR_ARGS);
+ QString format = QString().sprintf("%s(%REPR_FORMAT)",
+ PepType(Py_TYPE(%PYSELF))->tp_name, %REPR_ARGS);
%PYARG_0 = Shiboken::String::fromCString(qPrintable(format));
</template>
<template name="repr_code_matrix">
- QString format= QString("%1((").arg(((PyObject*)%PYSELF)->ob_type->tp_name);
+ QString format= QString("%1((").arg(PepType(Py_TYPE(%PYSELF))->tp_name);
QList&lt; %MATRIX_TYPE &gt; cppArgs;
%MATRIX_TYPE data[%MATRIX_SIZE];