From 06c39a99b6d815da8197a21ce4bf796447c3fd2e Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Sun, 9 Sep 2007 22:03:36 +0000 Subject: [PATCH] add net_interface_list wrapper --- bindings/python/_sigar.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/bindings/python/_sigar.c b/bindings/python/_sigar.c index 8078cfde..1245f88a 100644 --- a/bindings/python/_sigar.c +++ b/bindings/python/_sigar.c @@ -116,6 +116,42 @@ static int pysigar_parse_uint64(PyObject *args, sigar_uint64_t *val) return SIGAR_OK; } +static PyObject *pysigar_new_strlist(char **data, unsigned long number) +{ + unsigned long i; + PyObject *av; + + if (!(av = PyTuple_New(number))) { + return NULL; + } + + for (i=0; i