diff options
author | Michele Calgaro <[email protected]> | 2023-01-03 15:29:41 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2023-01-07 22:14:56 +0900 |
commit | 4ce11cc30df1805459a615960fdec204a975548a (patch) | |
tree | 084f1e1fa404bdf0d082b1a58acf392b5d177326 /sip/tdeui/keditlistbox.sip | |
parent | 065f41b4908b11278d4334e8c85150ec0fd4a9f6 (diff) | |
download | pytde-4ce11cc30df1805459a615960fdec204a975548a.tar.gz pytde-4ce11cc30df1805459a615960fdec204a975548a.zip |
Drop python2 support.
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'sip/tdeui/keditlistbox.sip')
-rw-r--r-- | sip/tdeui/keditlistbox.sip | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sip/tdeui/keditlistbox.sip b/sip/tdeui/keditlistbox.sip index 6fd3391..526db68 100644 --- a/sip/tdeui/keditlistbox.sip +++ b/sip/tdeui/keditlistbox.sip @@ -176,7 +176,7 @@ public: const char **PyTQtListToArray(PyObject *lst) { - int nstr; + SIP_SSIZE_T nstr; const char **str, **sp; nstr = PyList_Size(lst); @@ -190,15 +190,16 @@ const char **PyTQtListToArray(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; |