2023-05-17 05:07:12 -05:00
|
|
|
#[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());
|
2023-07-12 12:30:28 -05:00
|
|
|
g_free2(std::ptr::null_mut());
|
2023-05-17 05:07:12 -05:00
|
|
|
}
|
|
|
|
left + right
|
|
|
|
}
|
|
|
|
|
|
|
|
#[link(name = "glib-2.0")]
|
|
|
|
extern "C" {
|
|
|
|
fn g_free(p: *mut ());
|
|
|
|
}
|
2023-07-12 12:30:28 -05:00
|
|
|
|
|
|
|
#[link(name = "glib-2.0")]
|
|
|
|
extern "C" {
|
|
|
|
fn g_free2(p: *mut ());
|
|
|
|
}
|