def register_module(mod):
 for f in dir(mod.lib):
  f = getattr(mod.lib, f)
  if isinstance(f, BuiltinFunctionType):
   _ool_func_types[f] = mod.ffi.typeof(f)
   addr = mod.ffi.addressof(mod.lib, f.__name__)
   _ool_func_ptr[f] = int(mod.ffi.cast('uintptr_t', addr))
  _ffi_instances.add(mod.ffi)

def register_module ( mod ) : for f in dir ( mod . lib ) : f = getattr ( mod . lib , f ) if isinstance ( f , BuiltinFunctionType ) : _ool_func_types [ f ] = mod . ffi . typeof ( f ) addr = mod . ffi . addressof ( mod . lib , f . __name__ ) _ool_func_ptr [ f ] = int ( mod . ffi . cast ( 'uintptr_t' , addr ) ) _ffi_instances . add ( mod . ffi )
add typing for all functions in an out-of-line cffi module to the typemap .