Function show_notes::e029::ffi::add

source ·
pub(super) unsafe extern "C" fn add(a: c_int, b: c_int) -> c_int
Expand description

A mostly-trivial example: addition in C instead of in Rust. (See the docs for e029::add for why it isn’t totally trivial.)

You can use it in an unsafe block like so:

unsafe {
    let result = add(1, 2); // 3, of course!
}