Hi Kay,
On Sat, May 4, 2013 at 11:42 AM, <_k...@yahoo.com> wrote:
> The cffi-wrapped C code has a good notion of the number and type of
> arguments functions accept, the values needed to initialize a structured C
> data type etc. - and it should even know the names of formal parameters.
>
> I would like to somehow extract this information and ideally have it appear
> as a docstring somewhere further up in my python code. Is there a way to
> acces this information from python?
Good point. Right now you only have ffi.typeof(c_function), which
gives the signature as a string reconstructed from the internal
representation, without the names of formal parameters. It would be
nice if these c_function's also had a __doc__ that contains, say, the
original declaration.
Patches welcome, and bonus points if the
__doc__ also includes the relevant /*comments*/ from the cdef :-)