Re: C function taking double pointer to a structure variable as OUTPUT parameter

2009-07-28 Thread Diez B. Roggisch
fengmang_pyt...@sina.com schrieb: Hi, Everyone, I am a newbie to both Swig and Python. I am trying to export a set of C APIs to Python. If you are really dealing with a plain C-api, don't bother using SWIG - use ctypes. It comes with python >=2.5, is availabe as extra module for earlier ver

C function taking double pointer to a structure variable as OUTPUT parameter

2009-07-28 Thread fengmang_python
Hi, Everyone, I am a newbie to both Swig and Python. I am trying to export a set of C APIs to Python. My C function is int getInfor( char* name, int height, int weight, Infor** infor) //where infor is an OUTPUT parameter { .. *infor = (Infor*)malloc(sizeof(Infor)); .. }   The declare of