summaryrefslogtreecommitdiffstats
path: root/sip/qt/qpainter.sip
diff options
context:
space:
mode:
authoraneejit1 <aneejit1@gmail.com>2022-04-19 13:21:52 +0000
committerSlávek Banko <slavek.banko@axis.cz>2022-07-27 18:08:53 +0200
commit6be046642290c28c17949022fb66ae02ac21d544 (patch)
treee7b38b35a42b27569b26736afc4e472a2a5d672d /sip/qt/qpainter.sip
parent63fe0b82b47e7ee31f91374d96022a3ae77a86c3 (diff)
downloadpytqt-6be046642290c28c17949022fb66ae02ac21d544.tar.gz
pytqt-6be046642290c28c17949022fb66ae02ac21d544.zip
Updates to support Python version 3
Amendments to the sip source and configuration/build scripts to allow for support under Python version 3. The examples have been updated using "2to3" along with some manual changes to sort out intentation and casting to integer from float. Signed-off-by: aneejit1 <aneejit1@gmail.com> Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'sip/qt/qpainter.sip')
-rw-r--r--sip/qt/qpainter.sip10
1 files changed, 5 insertions, 5 deletions
diff --git a/sip/qt/qpainter.sip b/sip/qt/qpainter.sip
index 15ef70b..17c359f 100644
--- a/sip/qt/qpainter.sip
+++ b/sip/qt/qpainter.sip
@@ -289,7 +289,7 @@ public:
do
{
- if (PyList_SetItem(sipRes,len,PyInt_FromLong((long)*tp)) < 0)
+ if (PyList_SetItem(sipRes,len,PyLong_FromLong((long)*tp)) < 0)
{
Py_DECREF(sipRes);
sipIsErr = 1;
@@ -316,11 +316,11 @@ public:
{
// Convert the list.
- int *tp = tabs;
+ long *tp = tabs;
for (int i = 0; i < len; ++i)
{
- *tp++ = (int)PyInt_AsLong(PyList_GET_ITEM(a0,i));
+ *tp++ = PyLong_AsLong(PyList_GET_ITEM(a0,i));
if (PyErr_Occurred() != NULL)
{
@@ -612,7 +612,7 @@ public:
do
{
- if (PyList_SetItem(sipRes,len,PyInt_FromLong((long)*tp)) < 0)
+ if (PyList_SetItem(sipRes,len,PyLong_FromLong((long)*tp)) < 0)
{
Py_DECREF(sipRes);
sipIsErr = 1;
@@ -643,7 +643,7 @@ public:
for (int i = 0; i < len; ++i)
{
- *tp++ = (int)PyInt_AsLong(PyList_GET_ITEM(a0,i));
+ *tp++ = (int)PyLong_AsLong(PyList_GET_ITEM(a0,i));
if (PyErr_Occurred() != NULL)
{