diff options
Diffstat (limited to 'sources/shiboken6/shibokenmodule/typesystem_shiboken.xml')
-rw-r--r-- | sources/shiboken6/shibokenmodule/typesystem_shiboken.xml | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sources/shiboken6/shibokenmodule/typesystem_shiboken.xml b/sources/shiboken6/shibokenmodule/typesystem_shiboken.xml index b1b1f3212..74f9d0856 100644 --- a/sources/shiboken6/shibokenmodule/typesystem_shiboken.xml +++ b/sources/shiboken6/shibokenmodule/typesystem_shiboken.xml @@ -34,7 +34,7 @@ <add-function signature="getCppPointer(PyObject*)" return-type="PyObject*"> <inject-code> if (Shiboken::Object::checkType(%1)) { - std::vector<void*> ptrs = Shiboken::Object::cppPointers((SbkObject*)%1); + std::vector<void*> ptrs = Shiboken::Object::cppPointers(reinterpret_cast<SbkObject *>(%1)); %PYARG_0 = PyTuple_New(ptrs.size()); for (std::size_t i = 0; i < ptrs.size(); ++i) PyTuple_SET_ITEM(%PYARG_0, i, PyLong_FromVoidPtr(ptrs[i])); @@ -47,7 +47,7 @@ <add-function signature="delete(PyObject*)"> <inject-code> if (Shiboken::Object::checkType(%1)) { - Shiboken::Object::callCppDestructors((SbkObject*)%1); + Shiboken::Object::callCppDestructors(reinterpret_cast<SbkObject *>(%1)); } else { PyErr_SetString(PyExc_TypeError, "You need a shiboken-based type."); } @@ -57,7 +57,7 @@ <add-function signature="ownedByPython(PyObject*)" return-type="bool"> <inject-code> if (Shiboken::Object::checkType(%1)) { - bool hasOwnership = Shiboken::Object::hasOwnership((SbkObject*)%1); + bool hasOwnership = Shiboken::Object::hasOwnership(reinterpret_cast<SbkObject *>(%1)); %PYARG_0 = %CONVERTTOPYTHON[bool](hasOwnership); } else { PyErr_SetString(PyExc_TypeError, "You need a shiboken-based type."); @@ -68,7 +68,7 @@ <add-function signature="createdByPython(PyObject*)" return-type="bool"> <inject-code> if (Shiboken::Object::checkType(%1)) { - bool wasCreatedByPython = Shiboken::Object::wasCreatedByPython((SbkObject*)%1); + bool wasCreatedByPython = Shiboken::Object::wasCreatedByPython(reinterpret_cast<SbkObject *>(%1)); %PYARG_0 = %CONVERTTOPYTHON[bool](wasCreatedByPython); } else { PyErr_SetString(PyExc_TypeError, "You need a shiboken-based type."); @@ -81,7 +81,7 @@ if (!Shiboken::Object::checkType(%1)) { %PYARG_0 = Shiboken::String::fromCString("Ordinary Python type."); } else { - std::string str = Shiboken::Object::info((SbkObject*)%1); + std::string str = Shiboken::Object::info(reinterpret_cast<SbkObject *>(%1)); %PYARG_0 = Shiboken::String::fromCString(str.c_str()); } </inject-code> |