I am using Swig to wrap a C interface that looks like this:
int dosomething(char **str);
where str is an output string. For example, from C its called like this:
char *str= NULL;
int val= dosomething(&str);
...
free(str);
In Python, I'd like to be able to call it like this:
val,str = dosomething()
However, python keeps reporting
TypeError: dosomething() takes exactly 1 arguments (0 given)
I've tried using OUTPUT in a typemap, but to no avail. Any ideas?