update zig version, update @call for newer zig version

This commit is contained in:
Mitchell Hashimoto
2022-12-16 22:34:54 -08:00
parent b3090f60af
commit e210c91d10
11 changed files with 16 additions and 16 deletions

6
flake.lock generated
View File

@ -109,11 +109,11 @@
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1670908544,
"narHash": "sha256-SBlApO9OAnH2q4RqCHl8a2vZWhz/WAh+iojVM/k3bQ8=",
"lastModified": 1671236459,
"narHash": "sha256-J9Ow+I5cLUGE8IJMV08TAZP1DD4EP1TYnqgXVDIVzSU=",
"owner": "mitchellh",
"repo": "zig-overlay",
"rev": "066597fa3ed09d9c507f46a5850a392f451ef6cd",
"rev": "9a123723c252f3d2aad8523a6fbcba1b7a3c9698",
"type": "github"
},
"original": {

View File

@ -21,7 +21,7 @@ pub fn init(alloc: Allocator, loop: Loop, comptime cb: fn (*Async) void) !Async
const Wrapper = struct {
pub fn callback(arg: [*c]c.uv_async_t) callconv(.C) void {
var newSelf: Async = .{ .handle = arg };
@call(.{ .modifier = .always_inline }, cb, .{&newSelf});
@call(.always_inline, cb, .{&newSelf});
}
};

View File

@ -33,7 +33,7 @@ pub fn start(self: Idle, comptime cb: fn (*Idle) void) !void {
const Wrapper = struct {
pub fn callback(arg: [*c]c.uv_idle_t) callconv(.C) void {
var newSelf: Idle = .{ .handle = arg };
@call(.{ .modifier = .always_inline }, cb, .{&newSelf});
@call(.always_inline, cb, .{&newSelf});
}
};

View File

@ -33,7 +33,7 @@ pub fn start(self: Prepare, comptime cb: fn (*Prepare) void) !void {
const Wrapper = struct {
pub fn callback(arg: [*c]c.uv_prepare_t) callconv(.C) void {
var newSelf: Prepare = .{ .handle = arg };
@call(.{ .modifier = .always_inline }, cb, .{&newSelf});
@call(.always_inline, cb, .{&newSelf});
}
};

View File

@ -20,7 +20,7 @@ pub fn init(
) !Thread {
const CWrapper = struct {
pub fn wrapper(_: ?*const anyopaque) callconv(.C) void {
@call(.{ .modifier = .always_inline }, callback, .{});
@call(.always_inline, callback, .{});
}
};
@ -42,7 +42,7 @@ pub fn initData(
const CWrapper = struct {
pub fn wrapper(arg: ?*anyopaque) callconv(.C) void {
@call(.{ .modifier = .always_inline }, callback, .{
@call(.always_inline, callback, .{
@ptrCast(Data, @alignCast(@alignOf(dataInfo.Pointer.child), arg)),
});
}

View File

@ -39,7 +39,7 @@ pub fn start(
const Wrapper = struct {
pub fn callback(handle: [*c]c.uv_timer_t) callconv(.C) void {
var newSelf: Timer = .{ .handle = handle };
@call(.{ .modifier = .always_inline }, cb, .{&newSelf});
@call(.always_inline, cb, .{&newSelf});
}
};

View File

@ -36,7 +36,7 @@ pub fn Handle(comptime T: type) type {
// the T. This is mutable because a lot of the libuv APIs
// are non-const but modifying it makes no sense.
var param: T = .{ .handle = @ptrCast(HandleType, handle) };
@call(.{ .modifier = .always_inline }, f, .{&param});
@call(.always_inline, f, .{&param});
}
}).callback
else

View File

@ -44,7 +44,7 @@ pub fn Stream(comptime T: type) type {
const Wrapper = struct {
fn callback(cbreq: [*c]c.uv_write_t, status: c_int) callconv(.C) void {
var newreq: WriteReq = .{ .req = cbreq };
@call(.{ .modifier = .always_inline }, cb, .{
@call(.always_inline, cb, .{
&newreq,
@intCast(i32, status),
});
@ -90,7 +90,7 @@ pub fn Stream(comptime T: type) type {
buf: [*c]c.uv_buf_t,
) callconv(.C) void {
var param: T = .{ .handle = @ptrCast(HandleType, cbhandle) };
const result = @call(.{ .modifier = .always_inline }, alloc_cb, .{
const result = @call(.always_inline, alloc_cb, .{
&param,
cbsize,
});
@ -111,7 +111,7 @@ pub fn Stream(comptime T: type) type {
cbbuf: [*c]const c.uv_buf_t,
) callconv(.C) void {
var param: T = .{ .handle = @ptrCast(HandleType, cbhandle) };
@call(.{ .modifier = .always_inline }, read_cb, .{
@call(.always_inline, read_cb, .{
&param,
cbnread,
cbbuf.*.base[0..cbbuf.*.len],

View File

@ -80,7 +80,7 @@ pub fn MsgSend(comptime T: type) type {
// Due to this stage2 Zig issue[1], this must be var for now.
// [1]: https://github.com/ziglang/zig/issues/13598
var msg_send_ptr = @ptrCast(*const Fn, msg_send_fn);
const result = @call(.{}, msg_send_ptr, .{ target.value, sel.value } ++ args);
const result = @call(.auto, msg_send_ptr, .{ target.value, sel.value } ++ args);
if (!is_object) return result;
return .{ .value = result };

View File

@ -597,7 +597,7 @@ pub fn print(self: *Terminal, c: u21) !void {
switch (width) {
// Single cell is very easy: just write in the cell
1 => _ = @call(.{ .modifier = .always_inline }, self.printCell, .{c}),
1 => _ = @call(.always_inline, self.printCell, .{c}),
// Wide character requires a spacer. We print this by
// using two cells: the first is flagged "wide" and has the

2
vendor/mach vendored

@ -1 +1 @@
Subproject commit f331597bc24b9a1a3f62ac67e5af1927fb103918
Subproject commit c9793a4666d21608b1b28d0b67aaa7f7fd8b8031