@@ -313,7 +313,7 @@ void* PythonQtConv::handlePythonToQtAutoConversion(int typeId, PyObject* obj, vo
313313 if (typeId == cursorId) {
314314 static PyObject* qtCursorShapeEnum = PythonQtClassInfo::findEnumWrapper (" Qt::CursorShape" , nullptr );
315315 if ((PyObject*)obj->ob_type == qtCursorShapeEnum) {
316- Qt::CursorShape val = (Qt::CursorShape)PyInt_AsLong (obj);
316+ Qt::CursorShape val = (Qt::CursorShape)PyLong_AsLong (obj);
317317 if (!ptr) {
318318 PythonQtArgumentFrame_ADD_VARIANT_VALUE (frame, QCursor (), ptr);
319319 ptr = (void *)((QVariant*)ptr)->constData ();
@@ -325,7 +325,7 @@ void* PythonQtConv::handlePythonToQtAutoConversion(int typeId, PyObject* obj, vo
325325 // brushes can be created from QColor and from Qt::GlobalColor (and from brushes, but that's the default)
326326 static PyObject* qtColorClass = PythonQt::priv ()->getClassInfo (" QColor" )->pythonQtClassWrapper ();
327327 if ((PyObject*)obj->ob_type == qtGlobalColorEnum) {
328- Qt::GlobalColor val = (Qt::GlobalColor)PyInt_AsLong (obj);
328+ Qt::GlobalColor val = (Qt::GlobalColor)PyLong_AsLong (obj);
329329 if (!ptr) {
330330 PythonQtArgumentFrame_ADD_VARIANT_VALUE (frame, QPen (), ptr);
331331 ptr = (void *)((QVariant*)ptr)->constData ();
@@ -344,7 +344,7 @@ void* PythonQtConv::handlePythonToQtAutoConversion(int typeId, PyObject* obj, vo
344344 // brushes can be created from QColor and from Qt::GlobalColor (and from brushes, but that's the default)
345345 static PyObject* qtColorClass = PythonQt::priv ()->getClassInfo (" QColor" )->pythonQtClassWrapper ();
346346 if ((PyObject*)obj->ob_type == qtGlobalColorEnum) {
347- Qt::GlobalColor val = (Qt::GlobalColor)PyInt_AsLong (obj);
347+ Qt::GlobalColor val = (Qt::GlobalColor)PyLong_AsLong (obj);
348348 if (!ptr) {
349349 PythonQtArgumentFrame_ADD_VARIANT_VALUE (frame, QBrush (), ptr);
350350 ptr = (void *)((QVariant*)ptr)->constData ();
@@ -362,7 +362,7 @@ void* PythonQtConv::handlePythonToQtAutoConversion(int typeId, PyObject* obj, vo
362362 } else if (typeId == colorId) {
363363 // colors can be created from Qt::GlobalColor (and from colors, but that's the default)
364364 if ((PyObject*)obj->ob_type == qtGlobalColorEnum) {
365- Qt::GlobalColor val = (Qt::GlobalColor)PyInt_AsLong (obj);
365+ Qt::GlobalColor val = (Qt::GlobalColor)PyLong_AsLong (obj);
366366 if (!ptr) {
367367 PythonQtArgumentFrame_ADD_VARIANT_VALUE (frame, QColor (), ptr);
368368 ptr = (void *)((QVariant*)ptr)->constData ();
@@ -903,8 +903,8 @@ int PythonQtConv::PyObjGetInt(PyObject* val, bool strict, bool &ok) {
903903 d = 1 ;
904904 } else {
905905 PyErr_Clear ();
906- // PyInt_AsLong will try conversion to an int if the object is not an int:
907- d = PyInt_AsLong (val);
906+ // PyLong_AsLong will try conversion to an int if the object is not an int:
907+ d = PyLong_AsLong (val);
908908 if (PyErr_Occurred ()) {
909909 ok = false ;
910910 PyErr_Clear ();
0 commit comments