Module libffi::high::call
[−]
[src]
Simple dynamic calls.
This API allows us to call a code pointer with an array of arguments, using libffi to set up the call.
Examples
extern "C" fn hypot(x: f32, y: f32) -> f32 { (x * x + y * y).sqrt() } let result = unsafe { ffi_call!{ hypot(3f32, 4f32) -> f32 } }; assert!((result - 5f32).abs() < 0.0001);
Reexports
pub use middle::CodePtr; |
Structs
Arg |
Encapsulates an argument with its type information. |
Functions
arg | |
call⚠ |
Performs a dynamic call to a C function. |