I’m trying to wrap a C API (static library) from which the source is not available. One of the first tasks in using the API is to set up the environment structure.
env_t * my_env = NULL;
result = env_setup(&my_env);
with declaration
error_code env_setup(env_t ** env);
Is it even possible to manufacture pointers of this type (env_t **) in SWIG, considering that the layout of the env structure is hidden?
You may have to do some manipulation with typemaps.
Totally untested and lacking in error handling, but the intent here is to transform a
dictinto anenv_t **when calling from Python to C, and fromenv_t **todictwhen returning from C to Python.