im not using any flags, its just that the code is mostly clean
for example:
SWIGEXPORT void * SWIGSTDCALL CSharp_new_SimpleKeyWrapper() {
void * jresult ;
SimpleKeyWrapper *result = 0 ;
result = (SimpleKeyWrapper *)new SimpleKeyWrapper();
jresult = (void *)result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_delete_SimpleKeyWrapper(void * jarg1) {
SimpleKeyWrapper *arg1 = (SimpleKeyWrapper *) 0 ;
arg1 = (SimpleKeyWrapper *)jarg1;
delete arg1;
}
where SWIGEXPORT and SWIGSTDCALL are just the normal DLL exporting.
in other words, the C# target for Swig is mostly just the same wrapper you would make yourself to expose the functions.
and then it also generates a bunch of .cs modules to help access the functions, which i discard.