Implement new features #6
@ -41,8 +41,8 @@ pub fn native(stack: &mut Stack, arg: String) {
|
|||||||
unsafe {
|
unsafe {
|
||||||
let module = Library::new([libpref, arg, libsuf].join("")).unwrap();
|
let module = Library::new([libpref, arg, libsuf].join("")).unwrap();
|
||||||
// C libraries should use
|
// C libraries should use
|
||||||
// int labashka(unsinged short (*pop)(), void (*push)(unsinged short), size_t (*len)(), size_t max_size );
|
// void (*labashka)(unsigned short (*pop)(void), void (*push)(unsigned short), size_t (*len)(void), size_t max_size);
|
||||||
let func: Symbol<unsafe extern "C" fn(extern fn() -> u16, extern fn(u16) -> i32, extern fn () -> usize, usize) -> u32> = module.get(b"labashka").unwrap();
|
let func: Symbol<unsafe extern "C" fn(extern fn() -> u16, extern fn(u16) -> i32, extern fn () -> usize, usize)> = module.get(b"labashka").unwrap();
|
||||||
func(stack_pop_callback,stack_push_callback,stack_len_callback, stack.memory.size());
|
func(stack_pop_callback,stack_push_callback,stack_len_callback, stack.memory.size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user