diff options
Diffstat (limited to 'sip/qt/qimage.sip')
-rw-r--r-- | sip/qt/qimage.sip | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sip/qt/qimage.sip b/sip/qt/qimage.sip index dc2c85a..47f44a0 100644 --- a/sip/qt/qimage.sip +++ b/sip/qt/qimage.sip @@ -515,7 +515,7 @@ const char **PyTQt_qt_ListToArray(PyObject *lst); // TQPixmap. const char **PyTQt_qt_ListToArray(PyObject *lst) { - int nstr; + SIP_SSIZE_T nstr; const char **str, **sp; nstr = PyList_Size(lst); @@ -528,15 +528,16 @@ const char **PyTQt_qt_ListToArray(PyObject *lst) for (int i = 0; i < nstr; ++i) { - char *s; + PyObject *item = PyList_GetItem(lst, i); + const char *item_ascii = sipString_AsASCIIString(&item); - if ((s = PyString_AsString(PyList_GetItem(lst,i))) == NULL) + if (item_ascii == NULL) { sipFree((void *)str); return NULL; } - *sp++ = s; + *sp++ = item_ascii; } return str; |