On CPython, cannot use ffi.typeof with functions

Issue #71 resolved
Amaury Forgeot d'Arc
created an issue

On PyPy, cffi functions generated with ffi.verify can be introspected with ffi.typeof:

>>>> ffi.typeof(C.getpwuid).result is ffi.typeof('struct passwd *')

But this does not work on CPython, because they are C builtin functions. It would be nice if typeof() could work on these functions too.

Introspection like above would help library writers to write automatic conversion of parameters, for example.

Comments (1)

  1. Log in to comment