python - wrapping a custom hash table using swig -
i have custom implementation of hash table written in c application developing. want create wrapper in swig can map them native types "dict" in python. want able write single interface file can use both perl , python. first of want know if possible, or should individually each python , perl?
it's possible 1 implementation file. depending on complexity of implementation, can simple as:
%module my_hash %inline %{ #include "my_hash.h" %} and generating interface code with:
swig -python my_hash.i swig -perl my_hash.i if have write custom typemaps, may have use #ifdef swigpython or #ifdef swigperl specify language-specific code in interface definition.
Comments
Post a Comment