Skip to content

Commit 674092a

Browse files
committed
CALLBACK should be casted to a pointer
`CALLBACK` should be casted to a `*const fn () void` instead of `fn () void`
1 parent 9db4d80 commit 674092a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ pub const Module = opaque {
102102
fn cb(params: ?*const Valtype, results: ?*Valtype) callconv(.C) ?*Trap {
103103
_ = params;
104104
_ = results;
105-
const func = @as(fn () void, @ptrFromInt(CALLBACK));
105+
const func = @as(*const fn () void, @ptrFromInt(CALLBACK));
106106
func();
107107
return null;
108108
}

0 commit comments

Comments
 (0)