I am using SWIG to wrap the following C interface to access it from Python:
void some_method(char **output, int paramA, const char *paramB, int paramC); <
void some_method(char **output, int paramA, const char *paramB, int paramC);
Not a direct answer, but what you're working on sounds sufficiently low-level that you may want to consider forgoing SWIG and using the CPython api directly. SWIG is great, but it adds another dependency and loads of generated code.