This commit is contained in:
Oskar Thoren 2022-01-21 15:54:25 +08:00
parent 7421c2b93b
commit f52ba69439
No known key found for this signature in database
GPG Key ID: B2ECCFD3BC2EF77E
1 changed files with 9 additions and 1 deletions

View File

@ -29,7 +29,15 @@ impl<'a> From<&Buffer> for &'a [u8] {
} }
#[no_mangle] #[no_mangle]
pub extern "C" fn foobar() -> bool { pub extern "C" fn new(ctx: *mut *mut Multiplier) -> bool {
println!("multiplier ffi: new");
let mul = Multiplier::new();
unsafe { *ctx = Box::into_raw(Box::new(mul)) };
true
}
true true
} }