@@ -421,7 +421,7 @@ template <TYPE>
421421 {
422422 PyObject *tobj;
423423
424- if ((tobj = PyInt_FromLong (*it)) == NULL)
424+ if ((tobj = PyLong_FromLong (*it)) == NULL)
425425 {
426426 Py_DECREF(l);
427427 return NULL;
@@ -441,7 +441,7 @@ template <TYPE>
441441
442442 for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
443443 {
444- qset->insert(PyInt_AsLong (PyList_GET_ITEM(sipPy, i)));
444+ qset->insert(PyLong_AsLong (PyList_GET_ITEM(sipPy, i)));
445445 }
446446
447447 *sipCppPtr = qset;
@@ -743,7 +743,7 @@ template<TYPE>
743743 Py_ssize_t j = 0;
744744 while (PyDict_Next(tobj, &j, &kobj2, &tobj2))
745745 {
746- int k2 = PyInt_AsLong (kobj2);
746+ int k2 = PyLong_AsLong (kobj2);
747747 int state;
748748
749749 TYPE* t2 = reinterpret_cast<TYPE*>(sipConvertToType(tobj2, sipType_TYPE, sipTransferObj,SIP_NOT_NONE,&state,sipIsErr));
@@ -900,7 +900,7 @@ template<TYPE>
900900 QString *t1 = new QString(i.key());
901901
902902 PyObject *t1obj = sipConvertFromNewType(t1, sipType_QString, sipTransferObj);
903- PyObject *t2obj = PyInt_FromLong ( (long) i.value() );
903+ PyObject *t2obj = PyLong_FromLong ( (long) i.value() );
904904
905905 if (t1obj == NULL || t2obj == NULL || PyDict_SetItem(d, t1obj, t2obj) < 0)
906906 {
@@ -959,7 +959,7 @@ template<TYPE>
959959 int state;
960960
961961 QString *t1 = reinterpret_cast<QString *>(sipConvertToType(t1obj, sipType_QString, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
962- QVariant::Type t2 = (QVariant::Type) PyInt_AsLong (t1obj);
962+ QVariant::Type t2 = (QVariant::Type) PyLong_AsLong (t1obj);
963963
964964 if (*sipIsErr)
965965 {
@@ -1002,7 +1002,7 @@ template<TYPE>
10021002 QString *t1 = new QString(i.key());
10031003
10041004 PyObject *t1obj = sipConvertFromNewType(t1, sipType_QString, sipTransferObj);
1005- PyObject *t2obj = PyInt_FromLong ( (long) i.value() );
1005+ PyObject *t2obj = PyLong_FromLong ( (long) i.value() );
10061006
10071007 if (t1obj == NULL || t2obj == NULL || PyDict_SetItem(d, t1obj, t2obj) < 0)
10081008 {
@@ -1061,7 +1061,7 @@ template<TYPE>
10611061 int state;
10621062
10631063 QString *t1 = reinterpret_cast<QString *>(sipConvertToType(t1obj, sipType_QString, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
1064- int t2 = PyInt_AsLong (t1obj);
1064+ int t2 = PyLong_AsLong (t1obj);
10651065
10661066 if (*sipIsErr)
10671067 {
@@ -1501,7 +1501,7 @@ template<int, TYPE2*>
15011501 while (PyDict_Next(sipPy, &i, &t1obj, &t2obj))
15021502 {
15031503 int state2;
1504- int k = (int) PyInt_AsLong (t1obj);
1504+ int k = (int) PyLong_AsLong (t1obj);
15051505 for (int i = 0; i < PyList_GET_SIZE(t2obj); ++i)
15061506 {
15071507 TYPE2 *t2 =
@@ -1639,7 +1639,7 @@ template<int, TYPE2*>
16391639 }
16401640
16411641 PyObject *t1obj = sipConvertFromNewType(sipCpp->at(i).first, sipType_QgsVectorLayer, sipTransferObj);
1642- PyObject *t2obj = PyInt_FromLong ( (long) sipCpp->at(i).second );
1642+ PyObject *t2obj = PyLong_FromLong ( (long) sipCpp->at(i).second );
16431643 PyList_SetItem( p, 0, t1obj );
16441644 PyList_SetItem( p, 1, t2obj );
16451645
@@ -1775,7 +1775,7 @@ template <TYPE>
17751775 {
17761776 QgsFeature* oobj = new QgsFeature(*it.value());
17771777
1778- PyObject* keyobj = PyInt_FromLong (it.key());
1778+ PyObject* keyobj = PyLong_FromLong (it.key());
17791779 PyObject* pyOobj = sipConvertFromType(oobj, sipType_QgsFeature, sipTransferObj);
17801780 PyDict_SetItem(d, keyobj, pyOobj);
17811781
0 commit comments