Implement new features #6

Merged
n3tael merged 9 commits from bedohswe/labast:master into master 2024-06-20 20:39:40 +00:00
Showing only changes of commit 7223b995a3 - Show all commits

View File

@ -4,10 +4,9 @@
// rustc --crate-type cdylib native_test.rs -o native_test.dll // rustc --crate-type cdylib native_test.rs -o native_test.dll
#[no_mangle] #[no_mangle]
unsafe extern "C" fn labashka(pop: extern fn() -> u16, push: extern fn(u16) -> i32, len: extern fn () -> usize, max: usize) -> u32 { unsafe extern "C" fn labashka(pop: extern fn() -> u16, push: extern fn(u16) -> i32, len: extern fn () -> usize, max: usize) {
println!("At {}, there's {}.", len(), pop()); println!("At {}, there's {}.", len(), pop());
push(12); push(12);
println!("Maximum size is {}.", max); println!("Maximum size is {}.", max);
return 0;
} }