blob: 6acaee20ed4d7e3471ffa0db444c10f92d60d117 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
extern crate bar;
#[no_mangle]
pub extern "C" fn my_foo_add(left: i32, right: i32) -> i32 {
// Obviously makes no sense but...
unsafe {
init(std::ptr::null_mut());
}
bar::my_bar_add(left, right)
}
#[link(name = "systemd")]
extern "C" {
fn init(p: *mut ());
}
|