Skip to content

Commit

Permalink
fix zig
Browse files Browse the repository at this point in the history
Signed-off-by: Takeshi Yoneda <[email protected]>
  • Loading branch information
mathetake committed Mar 12, 2024
1 parent b2a3ee2 commit d5aef77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/allocation/zig/testdata/greet.zig
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ pub export fn greeting(message: [*]const u8, size: u32) u64 {
// stringToPtr returns a pointer and size pair for the given string in a way
// compatible with WebAssembly numeric types.
pub fn stringToPtr(s: []const u8) u64 {
const p: u64 = @ptrToInt(s.ptr);
const p: u64 = @intFromPtr(s.ptr);
return p << 32 | s.len;
}

0 comments on commit d5aef77

Please sign in to comment.