diff options
Diffstat (limited to 'sources/pyside6/PySide6')
-rw-r--r-- | sources/pyside6/PySide6/QtCore/typesystem_core_common.xml | 6 | ||||
-rw-r--r-- | sources/pyside6/PySide6/QtQml/pysideqmlregistertype.cpp | 2 | ||||
-rw-r--r-- | sources/pyside6/PySide6/glue/qtcore.cpp | 2 | ||||
-rw-r--r-- | sources/pyside6/PySide6/glue/qtgui.cpp | 4 | ||||
-rw-r--r-- | sources/pyside6/PySide6/glue/qtwidgets.cpp | 2 | ||||
-rw-r--r-- | sources/pyside6/PySide6/templates/core_common.xml | 8 |
6 files changed, 11 insertions, 13 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)); |