Skip to content

Commit

Permalink
cleanup: add PTR as an alias for I64 (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
zshipko authored Nov 2, 2023
1 parent ffb49c2 commit 5d96ab5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/basic.zig
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ pub fn main() !void {
const man = .{ .wasm = &[_]manifest.Wasm{.{ .wasm_file = wasmfile_manifest }} };
var f = Function.init(
"hello_world",
&[_]sdk.c.ExtismValType{sdk.c.I64},
&[_]sdk.c.ExtismValType{sdk.c.I64},
&[_]sdk.c.ExtismValType{sdk.PTR},
&[_]sdk.c.ExtismValType{sdk.PTR},
&hello_world,
@constCast(@as(*const anyopaque, @ptrCast("user data"))),
);
Expand Down
2 changes: 2 additions & 0 deletions src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ pub fn extismVersion() []const u8 {
const version = std.mem.span(c_version);
return version;
}

pub const PTR = c.I64;

0 comments on commit 5d96ab5

Please sign in to comment.