foreign function interface interface
This commit is contained in:
parent
0016af5f13
commit
1cceca8dfd
1 changed files with 1 additions and 1 deletions
|
@ -593,7 +593,7 @@ to represent a nullable function pointer using the C ABI (corresponding to the C
|
||||||
Here is a contrived example. Let's say some C library has a facility for registering a
|
Here is a contrived example. Let's say some C library has a facility for registering a
|
||||||
callback, which gets called in certain situations. The callback is passed a function pointer
|
callback, which gets called in certain situations. The callback is passed a function pointer
|
||||||
and an integer and it is supposed to run the function with the integer as a parameter. So
|
and an integer and it is supposed to run the function with the integer as a parameter. So
|
||||||
we have function pointers flying across the FFI interface in both directions.
|
we have function pointers flying across the FFI boundary in both directions.
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
use std::os::raw::c_int;
|
use std::os::raw::c_int;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue