ffi_call_***

The functions described below are used for calling a C function. fn_pointer is the function pointer returned by ffi_fn. Args must be an array and argp must be a pointer to a C object. That means argp will almost always be a value returned by a previous call to a C function that returns a void *.

ffi_call_void(fn_pointer, args) 
returns: void
ffi_call_void_pointer(fn_pointer, args)
returns: a C pointer.
ffi_call_char_string(fn_pointer, args) 
returns: a string.
ffi_call_int(fn_pointer, args) 
returns: an integer.
ffi_call_uint(fn_pointer, args) 
returns: an integer.
ffi_call_int64(fn_pointer, args) 
returns: a 64-bit integer.
ffi_call_float(fn_pointer, args) 
returns: a real number.
ffi_call_double(fn_pointer, args) 
returns: a real number.
ffi_call_obj(fn_pointer, args) 
returns: a Slogan object.
ffi_call_void_with_void_pointer(fn_pointer, argp, args) 
returns: void
ffi_call_void_pointer_with_void_pointer(fn_pointer, argp, args) 
returns: a C pointer.
ffi_call_char_string_with_void_pointer(fn_pointer, argp, args) 
returns: a string.
ffi_call_int_with_void_pointer(fn_pointer, argp, args) 
returns: an integer.
ffi_call_uint_with_void_pointer(fn_pointer, argp, args) 
returns: an unsigned integer.
ffi_call_int64_with_void_pointer(fn_pointer, argp, args) 
returns: a 64-bit integer.
ffi_call_float_with_void_pointer(fn_pointer, argp, args) 
returns: a real number.
ffi_call_double_with_void_pointer(fn_pointer, argp, args) 
returns: a real number.
ffi_call_obj_with_void_pointer(fn_pointer, argp, args) 
returns: a Slogan object.

Examples:

Please see the Foreign Function Interface Reference for examples.

Also see:

ffi_open


Core Module Index | Contents