rust/tests/run-make/print-native-static-libs/bar.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
259 B
Rust
Raw Normal View History

#[no_mangle]
pub extern "C" fn my_bar_add(left: i32, right: i32) -> i32 {
// Obviously makes no sense but...
unsafe {
g_free(std::ptr::null_mut());
}
left + right
}
#[link(name = "glib-2.0")]
extern "C" {
fn g_free(p: *mut ());
}