aboutsummaryrefslogtreecommitdiffstats
path: root/meson/test cases/rust/15 polyglot sharedlib/adder.rs
blob: 9095350355bd615307825f15ad83d02e9bc9999d (plain)
1
2
3
4
5
6
7
8
9
#[repr(C)]
pub struct Adder {
  pub number: i32
}

#[no_mangle]
pub extern fn adder_add(a: &Adder, number: i32) -> i32 {
    return a.number + number;
}