diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-09-13 08:56:09 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-09-13 11:11:34 +0200 |
commit | a89915c271c9da86fc0e9ba89552c1678449d6c4 (patch) | |
tree | 1846f9f2db9713e6a1775421925afb7f91eee7f9 /sources/shiboken6/generator/shiboken/cppgenerator.cpp | |
parent | 7ac7e8f34750202948117a2a3bd716b7ceef43f7 (diff) |
Remove SbkObjectType from the API
Leave only a deprecated typedef.
Complements a4311711eb89e3f9833a05edf3debdf7563a104f.
Task-number: PYSIDE-535
Change-Id: Icab9e82e7bff99363c01e471db1c84ee8d6c0b6b
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken6/generator/shiboken/cppgenerator.cpp')
-rw-r--r-- | sources/shiboken6/generator/shiboken/cppgenerator.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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<SbkObjectType *>(" + s << "if (Shiboken::Conversions::isImplicitConversion(reinterpret_cast<PyTypeObject *>(" << 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"), |