[Python-modules-team] Bug#782275: pre-parsed cffi runtime data structures

Glyph glyph at twistedmatrix.com
Tue Apr 14 03:46:18 UTC 2015


Right now, cffi uses pycparser to parse the declarations for two reasons:

1. to generate the .c file which it then compiles, at build time
2. to generate the run-time metadata it uses to invoke that library, at run time

there is no intermediary representation of the signatures which pycparser produces outside of this parsing, so right now, you still need pycparser no matter what.  Perhaps it would be good to generate such a representation so that the C code does not need to be parsed?  This would be a pretty major change, though.  This might also help with some memory usage issues where lots of pycparser internals persist after importing a module which has lots of cffi declarations in it.



More information about the Python-modules-team mailing list