summaryrefslogtreecommitdiffstats
path: root/src/stringlist.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stringlist.c')
-rw-r--r--src/stringlist.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/stringlist.c b/src/stringlist.c
index dc2a45d..22d6ef6 100644
--- a/src/stringlist.c
+++ b/src/stringlist.c
@@ -34,7 +34,7 @@ StringList* listToCList(PyObject* list)
PyObject* cListToPyList(StringList* list)
{
if (!list)
- return NULL;
+ Py_RETURN_NONE;
PyObject *ret = PyList_New(list->count);
for(int i = 0; i < list->count; i++)
@@ -45,6 +45,21 @@ PyObject* cListToPyList(StringList* list)
return ret;
}
+void stringListPrint(StringList* list)
+{
+ if (!list)
+ return;
+
+ for(int i = 0; i < list->count; i++)
+ {
+ printf("\"%s\"", list->list[i]);
+ if (i < list->count - 1)
+ printf(", ");
+ }
+
+ free(list);
+}
+
void stringListFree(StringList* list)
{
if (!list)
@@ -57,3 +72,4 @@ void stringListFree(StringList* list)
free(list);
}
+