Issue #7 resolved

Callback can't have void return type

tlynn
created an issue

"void foo(...)" callback functions work in the ctypes backend but crash the interpreter in the default backend.

Example:

{{{

!python

from cffi import FFI, backend_ctypes

ffi = FFI()

ffi = FFI(backend=backend_ctypes.CTypesBackend())

def foo(): pass foo_cb = ffi.callback("void foo()", foo) result = foo_cb() # crash! assert result is None }}} Output: {{{ convert_from_object: 'void' Fatal Python error: convert_from_object Aborted }}}

Comments (3)

  1. Log in to comment