C pointer representation in python

abarun22 at gmail.com abarun22 at gmail.com
Mon Nov 26 05:54:24 EST 2007


Hi
I am new to SWIG and python. I have a problem while trying to call a C
function from Python using SWIG as an interface. The function is
defined as follows.

void* myfunc(TfichierDLR *fichier, char *nom, char *type, char *txt,
char *classe, TicThemeDLR *icTheme, int **num, int *ier)

The last two are output parameters (**num and *ier) and i wonder how
to represent those while calling from python. Especially 'num' being a
double pointer is tricky to handle. Also how can we represent the
return variable which is a null pointer.

I would be extremely pleased to hear any ideas/suggestions in this
regard.

Regards
Arun



More information about the Python-list mailing list