Skip to content

Commit aa59520

Browse files
committed
Update the method to get callback address
Now functions are not pointers, so `@intFromPtr(callback)` should be changed to `@intFromPtr(&callback)`
1 parent 41539f0 commit aa59520

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
@@ -134,7 +134,7 @@ pub const Func = opaque {
134134
},
135135
else => @compileError("only functions can be used as callbacks into Wasm"),
136136
}
137-
CALLBACK = @intFromPtr(callback);
137+
CALLBACK = @intFromPtr(&callback);
138138

139139
var args = ValtypeVec.empty();
140140
var results = ValtypeVec.empty();

0 commit comments

Comments
 (0)