aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/generator
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken6/generator')
-rw-r--r--sources/shiboken6/generator/shiboken/cppgenerator.cpp10
-rw-r--r--sources/shiboken6/generator/shiboken/pytypenames.h2
-rw-r--r--sources/shiboken6/generator/shiboken/shibokengenerator.cpp2
3 files changed, 7 insertions, 7 deletions
diff --git a/sources/shiboken6/generator/shiboken/cppgenerator.cpp b/sources/shiboken6/generator/shiboken/cppgenerator.cpp
index cc5fb20fb..e84f29303 100644
--- a/sources/shiboken6/generator/shiboken/cppgenerator.cpp
+++ b/sources/shiboken6/generator/shiboken/cppgenerator.cpp
@@ -2469,7 +2469,7 @@ void CppGenerator::writeTypeCheck(TextStream &s, const OverloadData *overloadDat
}
// This condition trusts that the OverloadData object will arrange for
- // PyInt type to come after the more precise numeric types (e.g. float and bool)
+ // PyLong type to come after the more precise numeric types (e.g. float and bool)
AbstractMetaType argType = overloadData->argType();
if (auto viewOn = argType.viewOn())
argType = *viewOn;
@@ -4242,7 +4242,7 @@ void CppGenerator::writeClassDefinition(TextStream &s,
const AbstractMetaClass *qCoreApp = AbstractMetaClass::findClass(api().classes(), QLatin1String("QCoreApplication"));
const bool isQApp = qCoreApp != Q_NULLPTR && metaClass->inheritsFrom(qCoreApp);
- tp_flags = QLatin1String("Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES");
+ tp_flags = QLatin1String("Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE");
if (metaClass->isNamespace() || metaClass->hasPrivateDestructor()) {
tp_dealloc = metaClass->hasPrivateDestructor() ?
QLatin1String("SbkDeallocWrapperWithPrivateDtor") :
@@ -4262,7 +4262,7 @@ void CppGenerator::writeClassDefinition(TextStream &s,
? cpythonSetattroFunctionName(metaClass) : QString();
if (metaClass->hasPrivateDestructor() || onlyPrivCtor) {
- // tp_flags = QLatin1String("Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES");
+ // tp_flags = QLatin1String("Py_TPFLAGS_DEFAULT");
// This is not generally possible, because PySide does not care about
// privacy the same way. This worked before the heap types were used,
// because inheritance is not really checked for static types.
@@ -5189,7 +5189,7 @@ void CppGenerator::writeEnumInitialization(TextStream &s, const AbstractMetaEnum
s << "{\n";
{
Indentation indent(s);
- s << "PyObject *anonEnumItem = PyInt_FromLong(" << enumValueText << ");\n"
+ s << "PyObject *anonEnumItem = PyLong_FromLong(" << enumValueText << ");\n"
<< "if (PyDict_SetItemString(reinterpret_cast<PyTypeObject *>(reinterpret_cast<SbkObjectType *>("
<< enclosingObjectVariable
<< "))->tp_dict, \"" << mangledName << "\", anonEnumItem) < 0)\n";
@@ -5900,7 +5900,7 @@ void CppGenerator::writeGetattroFunction(TextStream &s, AttroCheck attroCheck,
Indentation indent(s);
s << "return Py_TYPE(meth)->tp_descr_get(meth, self, nullptr);\n";
}
- s << "return PyFunction_Check(meth) ? SBK_PyMethod_New(meth, self)\n"
+ s << "return PyFunction_Check(meth) ? PyMethod_New(meth, self)\n"
<< " : " << getattrFunc << ";\n";
}
s << "}\n";
diff --git a/sources/shiboken6/generator/shiboken/pytypenames.h b/sources/shiboken6/generator/shiboken/pytypenames.h
index 779f67f2f..d3b1fdbe9 100644
--- a/sources/shiboken6/generator/shiboken/pytypenames.h
+++ b/sources/shiboken6/generator/shiboken/pytypenames.h
@@ -33,7 +33,7 @@
static inline QString pyBoolT() { return QStringLiteral("PyBool"); }
static inline QString pyFloatT() { return QStringLiteral("PyFloat"); }
-static inline QString pyIntT() { return QStringLiteral("PyInt"); }
+static inline QString pyIntT() { return QStringLiteral("PyLong"); }
static inline QString pyLongT() { return QStringLiteral("PyLong"); }
static inline QString pyObjectT() { return QStringLiteral("object"); }
static inline QString pyStrT() { return QStringLiteral("str"); }
diff --git a/sources/shiboken6/generator/shiboken/shibokengenerator.cpp b/sources/shiboken6/generator/shiboken/shibokengenerator.cpp
index 920c668c1..9a2588e33 100644
--- a/sources/shiboken6/generator/shiboken/shibokengenerator.cpp
+++ b/sources/shiboken6/generator/shiboken/shibokengenerator.cpp
@@ -977,7 +977,7 @@ bool ShibokenGenerator::isPyInt(const TypeEntry *type)
if (!type->isPrimitive())
return false;
return pythonPrimitiveTypeName(static_cast<const PrimitiveTypeEntry *>(type))
- == QLatin1String("PyInt");
+ == QLatin1String("PyLong");
}
bool ShibokenGenerator::isPyInt(const AbstractMetaType &type)