Commit c0820963 authored by John Douglas Veitch's avatar John Douglas Veitch 💬
Browse files

Revert changes to swig bindings that are Octave-incompatible

parent 83574bde
......@@ -27,36 +27,3 @@
// Local Variables:
// mode: c
// End:
%typemap(in) char *[] {
// check if is a list
if(PyList_Check($input))
{
int size = PyList_Size($input);
int i = 0;
$1 = (char **)malloc((size + 1)*sizeof(char *));
for(i = 0; i < size; i++)
{
PyObject * o = PyList_GetItem($input, i);
if(PyString_Check(o))
$1[i] = PyString_AsString(o);
else
{
PyErr_SetString(PyExc_TypeError, "list must contain strings");
free($1);
return NULL;
}
}
}
else
{
PyErr_SetString(PyExc_TypeError, "not a list");
return NULL;
}
}
// clean up the char ** array
%typemap(freearg) char *[] {
free((char *) $1);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment