#define in swig

gianluca geonomica at gmail.com
Sat Jun 14 17:39:47 CEST 2008


I've a problem with python wrapper of C library. In a library's file
there are #define istruction but I can't access it from python. Other
functio works correctly.
The define istruction is like this:
#define START_OF_D 	_table_element=_mainsys-
>matD,_table_end=_table_element+Dsize(_mainsys)
#define START_OF_X 	_table_element=_mainsys-
>matX,_table_end=_table_element+_mainsys->matXsize
#define START_OF_MAT(set,num)
_table_element=(set),_table_end=_table_element+(num)*_mainsys-
>setAsize
#define END_OF_MAT     (_table_element<_table_end)
#define NEXT_OF_MAT    _table_element+=_mainsys->setAsize
#define ELEM_OF_MAT    _table_element
#define ElemOfRule(rules,num,attr) (rules)[(num)*(_mainsys-
>attributes_num)+(attr)]

thanks

Gianluca



More information about the Python-list mailing list