[−][src]Macro libffi::ffi_call
Performs a dynamic call to a C function.
This macro provides sugar for call::arg
and call::call
. For more
control, see high::call::call
.
Examples
extern "C" fn hypot(x: f32, y: f32) -> f32 { (x * x + y * y).sqrt() } use libffi::ffi_call; let result = unsafe { ffi_call!{ hypot(3f32, 4f32) -> f32 } }; assert!((result - 5f32).abs() < 0.0001);