- if (_result) {
- _resultobj = PyList_New(_result->GetCount());
- wxStringPtrList::Node *node = _result->GetFirst();
- for (int i=0; node; i++) {
- wxString *s = node->GetData();
-#if wxUSE_UNICODE
- PyList_SetItem(_resultobj, i, PyUnicode_FromUnicode(s->c_str(), s->Len()));
-#else
- PyList_SetItem(_resultobj, i, PyString_FromStringAndSize(s->c_str(), s->Len()));
-#endif
- node = node->GetNext();
- delete s;
- }
- delete _result;
- }
- else
- _resultobj=0;