diff options
Diffstat (limited to 'src/bun.js/api/ffi.zig')
-rw-r--r-- | src/bun.js/api/ffi.zig | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/bun.js/api/ffi.zig b/src/bun.js/api/ffi.zig index ba31b67ed..1ca44619d 100644 --- a/src/bun.js/api/ffi.zig +++ b/src/bun.js/api/ffi.zig @@ -383,7 +383,7 @@ pub const FFI = struct { const cb = JSC.NewRuntimeFunction( global, &str, - @intCast(u32, function.arg_types.items.len), + @as(u32, @intCast(function.arg_types.items.len)), bun.cast(JSC.JSHostFunctionPtr, compiled.ptr), false, ); @@ -479,7 +479,7 @@ pub const FFI = struct { const cb = JSC.NewRuntimeFunction( global, name, - @intCast(u32, function.arg_types.items.len), + @as(u32, @intCast(function.arg_types.items.len)), bun.cast(JSC.JSHostFunctionPtr, compiled.ptr), false, ); @@ -523,7 +523,7 @@ pub const FFI = struct { const int = val.to(i32); switch (int) { 0...ABIType.max => { - abi_types.appendAssumeCapacity(@enumFromInt(ABIType, int)); + abi_types.appendAssumeCapacity(@as(ABIType, @enumFromInt(int))); continue; }, else => { @@ -560,7 +560,7 @@ pub const FFI = struct { const int = ret_value.toInt32(); switch (int) { 0...ABIType.max => { - return_type = @enumFromInt(ABIType, int); + return_type = @as(ABIType, @enumFromInt(int)); break :brk; }, else => { @@ -594,11 +594,11 @@ pub const FFI = struct { if (ptr.isNumber()) { const num = ptr.asPtrAddress(); if (num > 0) - function.symbol_from_dynamic_library = @ptrFromInt(*anyopaque, num); + function.symbol_from_dynamic_library = @as(*anyopaque, @ptrFromInt(num)); } else { const num = ptr.toUInt64NoTruncate(); if (num > 0) { - function.symbol_from_dynamic_library = @ptrFromInt(*anyopaque, num); + function.symbol_from_dynamic_library = @as(*anyopaque, @ptrFromInt(num)); } } } @@ -831,7 +831,7 @@ pub const FFI = struct { return; } - var bytes: []u8 = try allocator.alloc(u8, @intCast(usize, relocation_size)); + var bytes: []u8 = try allocator.alloc(u8, @as(usize, @intCast(relocation_size))); defer { if (this.step == .failed) { allocator.free(bytes); @@ -1001,7 +1001,7 @@ pub const FFI = struct { return; } - var bytes: []u8 = try allocator.alloc(u8, @intCast(usize, relocation_size)); + var bytes: []u8 = try allocator.alloc(u8, @as(usize, @intCast(relocation_size))); defer { if (this.step == .failed) { allocator.free(bytes); |