aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6')
-rw-r--r--sources/pyside6/PySide6/QtCore/typesystem_core_common.xml6
-rw-r--r--sources/pyside6/PySide6/QtQml/pysideqmlregistertype.cpp2
-rw-r--r--sources/pyside6/PySide6/glue/qtcore.cpp2
-rw-r--r--sources/pyside6/PySide6/glue/qtgui.cpp4
-rw-r--r--sources/pyside6/PySide6/glue/qtwidgets.cpp2
-rw-r--r--sources/pyside6/PySide6/templates/core_common.xml8
-rw-r--r--sources/pyside6/libpyside/dynamicqmetaobject.cpp2
-rw-r--r--sources/pyside6/libpyside/feature_select.cpp12
-rw-r--r--sources/pyside6/libpyside/pysideqenum.cpp6
-rw-r--r--sources/pyside6/libpyside/pysideqflags.cpp2
-rw-r--r--sources/pyside6/libpyside/pysidesignal.cpp2
11 files changed, 23 insertions, 25 deletions
diff --git a/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml b/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
index e74fd8130..53ba2f254 100644
--- a/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
+++ b/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
@@ -187,7 +187,7 @@
<primitive-type name="short"/>
<primitive-type name="signed short"/>
<primitive-type name="signed short int"/>
- <primitive-type name="ushort" target-lang-api-name="PyInt"/>
+ <primitive-type name="ushort" target-lang-api-name="PyLong"/>
<primitive-type name="unsigned short int"/>
<primitive-type name="unsigned short"/>
<primitive-type name="char"/>
@@ -266,7 +266,7 @@
<native-to-target file="../glue/qtcore.cpp" snippet="return-pyunicode-qchar"/>
<target-to-native>
<add-conversion type="PyString" check="Shiboken::String::checkChar(%in)" file="../glue/qtcore.cpp" snippet="conversion-pystring-char"/>
- <add-conversion type="PyInt" file="../glue/qtcore.cpp" snippet="conversion-pyint"/>
+ <add-conversion type="PyLong" file="../glue/qtcore.cpp" snippet="conversion-pyint"/>
<add-conversion type="Py_None" file="../glue/qtcore.cpp" snippet="conversion-pynone"/>
</target-to-native>
</conversion-rule>
@@ -281,8 +281,6 @@
<add-conversion type="QString" check="Shiboken::String::check(%in)" file="../glue/qtcore.cpp" snippet="conversion-qstring"/>
<add-conversion type="QByteArray" file="../glue/qtcore.cpp" snippet="conversion-qbytearray"/>
<add-conversion type="PyFloat" check="PyFloat_CheckExact(%in)" file="../glue/qtcore.cpp" snippet="conversion-pyfloat"/>
- <!-- Using PyLong instead of PyInt to support Python2 and 3-->
- <add-conversion type="PyInt" check="PyInt_CheckExact(%in)" file="../glue/qtcore.cpp" snippet="conversion-qlonglong"/>
<add-conversion type="PyLong" check="PyLong_CheckExact(%in)" file="../glue/qtcore.cpp" snippet="conversion-qlonglong"/>
<add-conversion type="SbkEnumType" file="../glue/qtcore.cpp" snippet="conversion-pyint"/>
<add-conversion type="SbkObject" file="../glue/qtcore.cpp" snippet="conversion-sbkobject"/>
diff --git a/sources/pyside6/PySide6/QtQml/pysideqmlregistertype.cpp b/sources/pyside6/PySide6/QtQml/pysideqmlregistertype.cpp
index 852a15e21..d2b9b689e 100644
--- a/sources/pyside6/PySide6/QtQml/pysideqmlregistertype.cpp
+++ b/sources/pyside6/PySide6/QtQml/pysideqmlregistertype.cpp
@@ -166,7 +166,7 @@ int PySide::qmlRegisterSingletonType(PyObject *pyObj, const char *uri, int versi
AutoDecRef funcCode(PyObject_GetAttrString(callback, "__code__"));
AutoDecRef argCount(PyObject_GetAttrString(funcCode, "co_argcount"));
- int count = PyInt_AsLong(argCount);
+ int count = PyLong_AsLong(argCount);
if (count != 1) {
PyErr_Format(PyExc_TypeError, "Callback has a bad parameter count.");
diff --git a/sources/pyside6/PySide6/glue/qtcore.cpp b/sources/pyside6/PySide6/glue/qtcore.cpp
index 09e27c027..b683eef54 100644
--- a/sources/pyside6/PySide6/glue/qtcore.cpp
+++ b/sources/pyside6/PySide6/glue/qtcore.cpp
@@ -316,7 +316,7 @@ qAddPostRoutine(PySide::globalPostRoutineCallback);
QList<QByteArray> version = QByteArray(qVersion()).split('.');
PyObject *pyQtVersion = PyTuple_New(3);
for (int i = 0; i < 3; ++i)
- PyTuple_SET_ITEM(pyQtVersion, i, PyInt_FromLong(version[i].toInt()));
+ PyTuple_SET_ITEM(pyQtVersion, i, PyLong_FromLong(version[i].toInt()));
PyModule_AddObject(module, "__version_info__", pyQtVersion);
PyModule_AddStringConstant(module, "__version__", qVersion());
// @snippet qt-version
diff --git a/sources/pyside6/PySide6/glue/qtgui.cpp b/sources/pyside6/PySide6/glue/qtgui.cpp
index 5b91790cf..5874dc608 100644
--- a/sources/pyside6/PySide6/glue/qtgui.cpp
+++ b/sources/pyside6/PySide6/glue/qtgui.cpp
@@ -510,8 +510,8 @@ if (PySequence_Check(_key)) {
if (PySequence_Fast_GET_SIZE(key.object()) == 2) {
PyObject *posx = PySequence_Fast_GET_ITEM(key.object(), 0);
PyObject *posy = PySequence_Fast_GET_ITEM(key.object(), 1);
- Py_ssize_t x = PyInt_AsSsize_t(posx);
- Py_ssize_t y = PyInt_AsSsize_t(posy);
+ Py_ssize_t x = PyLong_AsSsize_t(posx);
+ Py_ssize_t y = PyLong_AsSsize_t(posy);
float ret = (*%CPPSELF)(x,y);
return %CONVERTTOPYTHON[float](ret);
}
diff --git a/sources/pyside6/PySide6/glue/qtwidgets.cpp b/sources/pyside6/PySide6/glue/qtwidgets.cpp
index 0a934710b..d2b7872d4 100644
--- a/sources/pyside6/PySide6/glue/qtwidgets.cpp
+++ b/sources/pyside6/PySide6/glue/qtwidgets.cpp
@@ -55,7 +55,7 @@ Shiboken::Object::releaseOwnership(%PYARG_0);
// @snippet qtreewidgetitemiterator-value
// @snippet qgraphicsitem
-PyObject *userTypeConstant = PyInt_FromLong(QGraphicsItem::UserType);
+PyObject *userTypeConstant = PyLong_FromLong(QGraphicsItem::UserType);
PyDict_SetItemString(reinterpret_cast<PyTypeObject *>(Sbk_QGraphicsItem_TypeF())->tp_dict, "UserType", userTypeConstant);
// @snippet qgraphicsitem
diff --git a/sources/pyside6/PySide6/templates/core_common.xml b/sources/pyside6/PySide6/templates/core_common.xml
index 2193e340c..ada2e92d3 100644
--- a/sources/pyside6/PySide6/templates/core_common.xml
+++ b/sources/pyside6/PySide6/templates/core_common.xml
@@ -193,10 +193,10 @@
PyObject* _obj = %PYARG_0.object();
if (!PySequence_Check(_obj)
|| PySequence_Fast_GET_SIZE(_obj) != 4
- || !SbkNumber_Check(PySequence_Fast_GET_ITEM(_obj, 0))
- || !SbkNumber_Check(PySequence_Fast_GET_ITEM(_obj, 1))
- || !SbkNumber_Check(PySequence_Fast_GET_ITEM(_obj, 2))
- || !SbkNumber_Check(PySequence_Fast_GET_ITEM(_obj, 3))) {
+ || !PyNumber_Check(PySequence_Fast_GET_ITEM(_obj, 0))
+ || !PyNumber_Check(PySequence_Fast_GET_ITEM(_obj, 1))
+ || !PyNumber_Check(PySequence_Fast_GET_ITEM(_obj, 2))
+ || !PyNumber_Check(PySequence_Fast_GET_ITEM(_obj, 3))) {
PyErr_SetString(PyExc_TypeError, "Sequence of 4 numbers expected");
} else {
*%1 = %CONVERTTOCPP[$TYPE](PySequence_Fast_GET_ITEM(_obj, 0));
diff --git a/sources/pyside6/libpyside/dynamicqmetaobject.cpp b/sources/pyside6/libpyside/dynamicqmetaobject.cpp
index 39be38b29..b7febf492 100644
--- a/sources/pyside6/libpyside/dynamicqmetaobject.cpp
+++ b/sources/pyside6/libpyside/dynamicqmetaobject.cpp
@@ -577,7 +577,7 @@ void MetaObjectBuilderPrivate::parsePythonType(PyTypeObject *type)
AutoDecRef member(PySequence_GetItem(item, 1));
AutoDecRef value(PyObject_GetAttr(member, Shiboken::PyName::value()));
auto ckey = String::toCString(key);
- auto ivalue = PyInt_AsSsize_t(value); // int/long cheating
+ auto ivalue = PyLong_AsSsize_t(value);
auto thing = QPair<QByteArray, int>(ckey, int(ivalue));
entries.push_back(thing);
}
diff --git a/sources/pyside6/libpyside/feature_select.cpp b/sources/pyside6/libpyside/feature_select.cpp
index 648ec96a3..492e30c28 100644
--- a/sources/pyside6/libpyside/feature_select.cpp
+++ b/sources/pyside6/libpyside/feature_select.cpp
@@ -187,7 +187,7 @@ static inline PyObject *getSelectId(PyObject *dict)
static inline void setCurrentSelectId(PyTypeObject *type, PyObject *select_id)
{
- SbkObjectType_SetReserved(type, PyInt_AsSsize_t(select_id)); // int/long cheating
+ SbkObjectType_SetReserved(type, PyLong_AsSsize_t(select_id)); // int/long cheating
}
static inline void setCurrentSelectId(PyTypeObject *type, int id)
@@ -217,7 +217,7 @@ static bool replaceClassDict(PyTypeObject *type)
if (new_dict == nullptr || PyDict_Update(new_dict, dict) < 0)
return false;
// Insert the default id. Cannot fail for small numbers.
- AutoDecRef select_id(PyInt_FromLong(0));
+ AutoDecRef select_id(PyLong_FromLong(0));
setSelectId(new_dict, select_id);
// insert the dict into itself as ring
setNextDict(new_dict, new_dict);
@@ -283,9 +283,9 @@ static bool createNewFeatureSet(PyTypeObject *type, PyObject *select_id)
* content in `prev_dict`. It is responsible of filling `type->tp_dict`
* with modified content.
*/
- static auto small_1 = PyInt_FromLong(255);
+ static auto small_1 = PyLong_FromLong(255);
Q_UNUSED(small_1);
- static auto small_2 = PyInt_FromLong(255);
+ static auto small_2 = PyLong_FromLong(255);
Q_UNUSED(small_2);
// make sure that small integers are cached
assert(small_1 != nullptr && small_1 == small_2);
@@ -299,7 +299,7 @@ static bool createNewFeatureSet(PyTypeObject *type, PyObject *select_id)
Py_INCREF(prev_dict); // keep the first ref unchanged
if (!addNewDict(type, select_id))
return false;
- auto id = PyInt_AsSsize_t(select_id); // int/long cheating
+ auto id = PyLong_AsSsize_t(select_id); // int/long cheating
if (id == -1)
return false;
setCurrentSelectId(type, id);
@@ -434,7 +434,7 @@ void init()
if (!is_initialized) {
fast_id_array = &_fast_id_array[1];
for (int idx = -1; idx < 256; ++idx)
- fast_id_array[idx] = PyInt_FromLong(idx);
+ fast_id_array[idx] = PyLong_FromLong(idx);
featurePointer = featureProcArray;
initSelectableFeature(SelectFeatureSet);
registerCleanupFunction(finalize);
diff --git a/sources/pyside6/libpyside/pysideqenum.cpp b/sources/pyside6/libpyside/pysideqenum.cpp
index 07a548cb6..8abf19313 100644
--- a/sources/pyside6/libpyside/pysideqenum.cpp
+++ b/sources/pyside6/libpyside/pysideqenum.cpp
@@ -99,7 +99,7 @@ static PyObject *analyzePyEnum(PyObject *pyenum, PyObject *container = nullptr)
AutoDecRef value(PyObject_GetAttr(member, Shiboken::PyName::value()));
if (value.isNull())
return nullptr;
- if (!PyInt_Check(value)) { // int/long cheating
+ if (!PyLong_Check(value)) {
PyErr_Format(PyExc_TypeError,
"QEnum expected an int value as '%.200s', got '%.200s'",
Shiboken::String::toCString(key), Py_TYPE(value)->tp_name);
@@ -113,9 +113,9 @@ static Py_ssize_t get_lineno()
{
PyObject *frame = reinterpret_cast<PyObject *>(PyEval_GetFrame()); // borrowed ref
AutoDecRef ob_lineno(PyObject_GetAttr(frame, Shiboken::PyName::f_lineno()));
- if (ob_lineno.isNull() || !PyInt_Check(ob_lineno)) // int/long cheating
+ if (ob_lineno.isNull() || !PyLong_Check(ob_lineno))
return -1;
- return PyInt_AsSsize_t(ob_lineno); // int/long cheating
+ return PyLong_AsSsize_t(ob_lineno);
}
static bool is_module_code()
diff --git a/sources/pyside6/libpyside/pysideqflags.cpp b/sources/pyside6/libpyside/pysideqflags.cpp
index 3252aa9e6..eb4e0e7bb 100644
--- a/sources/pyside6/libpyside/pysideqflags.cpp
+++ b/sources/pyside6/libpyside/pysideqflags.cpp
@@ -156,7 +156,7 @@ namespace QFlags
"missing QFlags name", // to be inserted later
sizeof(PySideQFlagsObject),
0,
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES,
+ Py_TPFLAGS_DEFAULT,
SbkNewQFlagsType_slots,
};
diff --git a/sources/pyside6/libpyside/pysidesignal.cpp b/sources/pyside6/libpyside/pysidesignal.cpp
index 276da1cad..c2a0e31f5 100644
--- a/sources/pyside6/libpyside/pysidesignal.cpp
+++ b/sources/pyside6/libpyside/pysidesignal.cpp
@@ -770,7 +770,7 @@ QByteArray getTypeName(PyObject *type)
auto objType = reinterpret_cast<PyTypeObject *>(type);
if (Shiboken::String::checkType(objType))
return QByteArrayLiteral("QString");
- if (objType == &PyInt_Type)
+ if (objType == &PyLong_Type)
return QByteArrayLiteral("int");
if (objType == &PyLong_Type)
return QByteArrayLiteral("long");