summaryrefslogtreecommitdiffstats
path: root/sip/tdeui/keditlistbox.sip
diff options
context:
space:
mode:
Diffstat (limited to 'sip/tdeui/keditlistbox.sip')
-rw-r--r--sip/tdeui/keditlistbox.sip9
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;