Strategies for using cffi with C++ code?

Skip Montanaro skip.montanaro at gmail.com
Thu May 21 12:41:30 EDT 2015


If my reading so far is correct, you can't directly apply cffi to C++
libraries. Everything has to be wrapped in "extern C" declarations, which
means, practically speaking, that you have to provide factory function
wrapper(s) around constructors and methods. I did find a trivial example:

https://gist.github.com/tonyseek/7821993

but that just exposes a simple function to the Python programmer. Does
someone have a pointer to more substantive example of exposing a C++ class
to Python?

Thanks,

Skip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20150521/11184aaf/attachment.html>


More information about the Python-list mailing list