forked from n3tael/labast
Fix the function signature in #native
This commit is contained in:
parent
b42d582bad
commit
e174f3a885
@ -41,8 +41,8 @@ pub fn native(stack: &mut Stack, arg: String) {
|
||||
unsafe {
|
||||
let module = Library::new([libpref, arg, libsuf].join("")).unwrap();
|
||||
// C libraries should use
|
||||
// int labashka(unsinged short (*pop)(), void (*push)(unsinged short), size_t (*len)(), 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();
|
||||
// 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)> = module.get(b"labashka").unwrap();
|
||||
func(stack_pop_callback,stack_push_callback,stack_len_callback, stack.memory.size());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user