Efficient data flow between orthogonal C extensions?
Magnus Lie Hetland
mlh at furu.idi.ntnu.no
Thu Jun 5 18:17:53 EDT 2003
In article <slrnbdvdlb.dfi.mlh at furu.idi.ntnu.no>, Magnus Lie Hetland wrote:
>In article <87znkwwmbg.fsf at smtp.gsi.de>, Pierre Schnizer wrote:
>[snip]
>>Perhaps I should have been more explicit. If I get your viewpoint correctly, I
>>can answer: SWIG generally can do the job you described above.
I have now written a small test, but can't make this work. (For one
thing, it seems that SWIG has started to create .py-wrappers for the c
modules, and that I have to give a _foo name rather than a foo name to
distutils etc. Hm. Oh, well.)
I've written the function
void callback(char *);
in one module and the function
void caller(void (*callback)(char *));
in another. When I swig/compile these, import them, and try to pass
callback as a parameter to caller, I get the following error:
TypeError: Type error. Expected _p_f_p_char__void
What am I doing wrong?
--
Magnus Lie Hetland "In this house we obey the laws of
http://hetland.org thermodynamics!" Homer Simpson
More information about the Python-list
mailing list