diff options
Diffstat (limited to 'sources/shiboken2/tests/samplebinding/typesystem_sample.xml')
-rw-r--r-- | sources/shiboken2/tests/samplebinding/typesystem_sample.xml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sources/shiboken2/tests/samplebinding/typesystem_sample.xml b/sources/shiboken2/tests/samplebinding/typesystem_sample.xml index 3cc80860d..5f0a9206b 100644 --- a/sources/shiboken2/tests/samplebinding/typesystem_sample.xml +++ b/sources/shiboken2/tests/samplebinding/typesystem_sample.xml @@ -1666,7 +1666,7 @@ Tested in InjectCodeTest.testTypeNativeBeginning_TypeTargetBeginning: --> <inject-code class="target" position="beginning"> - %PYTHONTYPEOBJECT.tp_str = InjectCode_tpstr; + PepType(&%PYTHONTYPEOBJECT)->tp_str = InjectCode_tpstr; </inject-code> <!-- Tested in InjectCodeTest.testFunctionTargetBeginning_FunctionTargetEnd --> @@ -2178,7 +2178,7 @@ </add-function> <add-function signature="__repr__" return-type="PyObject*"> <inject-code class="target" position="beginning"> - ByteArray b(((PyObject*)%PYSELF)->ob_type->tp_name); + ByteArray b(PepType(Py_TYPE(%PYSELF))->tp_name); PyObject* aux = Shiboken::String::fromStringAndSize(%CPPSELF.data(), %CPPSELF.size()); if (PyUnicode_CheckExact(aux)) { PyObject* tmp = PyUnicode_AsASCIIString(aux); |