aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/PySide2/QtScript
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2017-12-17 19:12:56 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2018-05-30 18:13:41 +0000
commit18dc31becdd994c53a9f894087cf1ef99fbd0232 (patch)
tree3021cfa473f20102bfb63a26117776615b91b526 /sources/pyside2/PySide2/QtScript
parent50dd4ae202d7afb3556335c056db003f5ef50532 (diff)
PEP 384-squash: Implement PEP 384
This is the condensed checkin of 18 commits which created the implementation of PEP 384. Task-number: PYSIDE-560 Change-Id: I834c659af4c2b55b268f8e8dc4cfa53f02502409 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'sources/pyside2/PySide2/QtScript')
-rw-r--r--sources/pyside2/PySide2/QtScript/typesystem_script.xml7
1 files changed, 4 insertions, 3 deletions
diff --git a/sources/pyside2/PySide2/QtScript/typesystem_script.xml b/sources/pyside2/PySide2/QtScript/typesystem_script.xml
index ccb2e3ab7..dc089a300 100644
--- a/sources/pyside2/PySide2/QtScript/typesystem_script.xml
+++ b/sources/pyside2/PySide2/QtScript/typesystem_script.xml
@@ -84,11 +84,12 @@
<add-function signature="__repr__" return-type="PyObject*">
<inject-code class="target" position="beginning">
if (%CPPSELF.isVariant() || %CPPSELF.isString()) {
- QString format = QString().sprintf("%s(\"%s\")", ((PyObject*)%PYSELF)->ob_type->tp_name, qPrintable(%CPPSELF.toString()));
+ QString format = QString().sprintf("%s(\"%s\")",
+ PepType(Py_TYPE(%PYSELF))->tp_name,
+ qPrintable(%CPPSELF.toString()));
%PYARG_0 = Shiboken::String::fromCString(qPrintable(format));
} else {
- %PYARG_0 = Shiboken::String::fromCString(
- ((PyObject* )%PYSELF)->ob_type->tp_name);
+ %PYARG_0 = Shiboken::String::fromCString(PepType(Py_TYPE(%PYSELF))->tp_name);
}
</inject-code>
</add-function>