Skip to content

Commit fdd4a77

Browse files
authored
Fix ABI of jitted function in cranelift-jit example. (#5736)
1 parent 72962c9 commit fdd4a77

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cranelift/jit/examples/jit-minimal.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ fn main() {
8484
let code_b = module.get_finalized_function(func_b);
8585

8686
// Cast it to a rust function pointer type.
87-
let ptr_b = unsafe { mem::transmute::<_, fn() -> u32>(code_b) };
87+
let ptr_b = unsafe { mem::transmute::<_, extern "C" fn() -> u32>(code_b) };
8888

8989
// Call it!
9090
let res = ptr_b();

0 commit comments

Comments
 (0)