From 47eac0d0c518c02d45f542cf845790b470a3fd68 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Sat, 11 Mar 2023 20:19:33 -0700 Subject: [PATCH] sysjs: update to latest Zig version Signed-off-by: Stephen Gutekanst --- libs/sysjs/src/main.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/sysjs/src/main.zig b/libs/sysjs/src/main.zig index abcc04f6..67cc1b46 100644 --- a/libs/sysjs/src/main.zig +++ b/libs/sysjs/src/main.zig @@ -142,7 +142,7 @@ pub const Object = struct { } pub fn copyBytes(obj: *const Object, bytes: []u8) void { - js.zigCopyBytes(obj.ref, bytes.ptr, bytes.len); + js.zigCopyBytes(obj.ref, bytes.ptr, @intCast(u32, bytes.len)); } pub fn call(obj: *const Object, fun: []const u8, args: []const Value) Value { @@ -254,7 +254,7 @@ pub fn createUndefined() Value { const FunType = *const fn (args: Object, args_len: u32, captures: []Value) Value; pub fn createFunction(fun: FunType, captures: []Value) Function { - return .{ .ref = js.zigCreateFunction(fun, captures.ptr, captures.len) }; + return .{ .ref = js.zigCreateFunction(fun, captures.ptr, @intCast(u32, captures.len)) }; } pub fn constructType(t: []const u8, args: []const Value) Object {