From a89915c271c9da86fc0e9ba89552c1678449d6c4 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 13 Sep 2021 08:56:09 +0200 Subject: Remove SbkObjectType from the API Leave only a deprecated typedef. Complements a4311711eb89e3f9833a05edf3debdf7563a104f. Task-number: PYSIDE-535 Change-Id: Icab9e82e7bff99363c01e471db1c84ee8d6c0b6b Reviewed-by: Christian Tismer --- sources/shiboken6/generator/shiboken/cppgenerator.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sources/shiboken6/generator/shiboken/cppgenerator.cpp') diff --git a/sources/shiboken6/generator/shiboken/cppgenerator.cpp b/sources/shiboken6/generator/shiboken/cppgenerator.cpp index 32c82f2cb..66e8de04e 100644 --- a/sources/shiboken6/generator/shiboken/cppgenerator.cpp +++ b/sources/shiboken6/generator/shiboken/cppgenerator.cpp @@ -2702,7 +2702,7 @@ void CppGenerator::writePythonToCppTypeConversion(TextStream &s, if (!defaultValue.isEmpty()) s << "if (" << pythonToCppFunc << ") {\n" << indent; - s << "if (Shiboken::Conversions::isImplicitConversion(reinterpret_cast(" + s << "if (Shiboken::Conversions::isImplicitConversion(reinterpret_cast(" << cpythonTypeNameExt(type) << "), " << pythonToCppFunc << "))\n" << indent << pythonToCppFunc << '(' << pyIn << ", &" << cppOutAux << ");\n" << outdent << "else\n" << indent @@ -4035,7 +4035,7 @@ void CppGenerator::writeSpecialCastFunction(TextStream &s, const AbstractMetaCla { QString className = metaClass->qualifiedCppName(); s << "static void * " << cpythonSpecialCastFunctionName(metaClass) - << "(void *obj, SbkObjectType *desiredType)\n{\n" << indent + << "(void *obj, PyTypeObject *desiredType)\n{\n" << indent << "auto me = reinterpret_cast< ::" << className << " *>(obj);\n"; bool firstClass = true; const AbstractMetaClassList &allAncestors = metaClass->allTypeSystemAncestors(); @@ -4425,8 +4425,8 @@ void CppGenerator::writeClassDefinition(TextStream &s, const QString typePtr = QLatin1String("_") + className + QLatin1String("_Type"); - s << "static SbkObjectType *" << typePtr << " = nullptr;\n" - << "static SbkObjectType *" << className << "_TypeF(void)\n" + s << "static PyTypeObject *" << typePtr << " = nullptr;\n" + << "static PyTypeObject *" << className << "_TypeF(void)\n" << "{\n" << indent << "return " << typePtr << ";\n" << outdent << "}\n\nstatic PyType_Slot " << className << "_slots[] = {\n" << indent << "{Py_tp_base, nullptr}, // inserted by introduceWrapperType\n" @@ -5809,7 +5809,7 @@ void CppGenerator::writeTypeDiscoveryFunction(TextStream &s, const AbstractMetaC QString polymorphicExpr = metaClass->typeEntry()->polymorphicIdValue(); s << "static void *" << cpythonBaseName(metaClass) - << "_typeDiscovery(void *cptr, SbkObjectType *instanceType)\n{\n" << indent; + << "_typeDiscovery(void *cptr, PyTypeObject *instanceType)\n{\n" << indent; if (!polymorphicExpr.isEmpty()) { polymorphicExpr = polymorphicExpr.replace(QLatin1String("%1"), -- cgit v1.2.3