Fw: [cffi-devel]Pls ignore last post under this - New and delete pertaining C wrapper for C++ code

Daniel Herring dherring at tentpost.com
Sun Mar 23 01:21:27 UTC 2014


Hi Joeish,

The best path is probably to write a small script that generates the C 
wrappers and CFFI bindings for a list of class names.

There is a way to skip the C wrappers entirely, but it is generally more 
fragile and harder to implement.  It turns out that most C++ functions are 
nothing more than carefully named C functions.  However, there are a 
number of subtleties in their calling convention (in particular casting 
derived classes, calling virtual functions, and filling in default 
parameters).  It is also intentionally difficult to find the right 
function names to use.  Thus very few people go down this path.

- Daniel



More information about the cffi-devel mailing list