1. Python CFFI
  2. Untitled project
  3. cffi
  4. Issues
Issue #71 resolved

On CPython, cannot use ffi.typeof with functions

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 *')
True

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