A branch to use a cffi-style C parser to create rffi objects in cpyext.
rffi structures can now be created by parsing simple C headers, which ensures that the RPython and C sides use the same definitions, and makes it easier to port CPython code to cpyext. Additionally, the cts
object that holds the parsed information can act like cffi's ffi
objects, with the methods cts.cast
and cts.gettype
(more methods can and probably should be added).
The parser is a hacked variant of cffi's parser which depends on cffi internals, so this a bit of a maintenance issue, but I guess we can expect some support from cffi maintainers ;-)