Binding with SWIG - typedef'ed types bound incorrectly
I have swig.i file like that: %module ogr_api %{ #include "ogr_api.h" %} %inline %{ typedef void *OGRSFDriverH; %} /* OGRSFDriverRegistrar */ OGRDataSourceH OGROpen( const char *, int, OGRSFDriverH * )` and I get the following .c wrapper: ... SWIGEXPORT void * D_OGROpen(char * jarg1, int jarg2, void * jarg3) { ... That is SWIG translates OGRSFDriverH to just void*. I need to save the type name. How could I do it? Also I loss const in the first argument, but this is the next question. Flexo Assuming I've understood your question correctly you have a number of opaque "handles" that in C are