mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
update zig version, update @call for newer zig version
This commit is contained in:
6
flake.lock
generated
6
flake.lock
generated
@ -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": {
|
||||
|
@ -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});
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -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});
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -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});
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -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)),
|
||||
});
|
||||
}
|
||||
|
@ -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});
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -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, .{¶m});
|
||||
@call(.always_inline, f, .{¶m});
|
||||
}
|
||||
}).callback
|
||||
else
|
||||
|
@ -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, .{
|
||||
¶m,
|
||||
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, .{
|
||||
¶m,
|
||||
cbnread,
|
||||
cbbuf.*.base[0..cbbuf.*.len],
|
||||
|
@ -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 };
|
||||
|
@ -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
2
vendor/mach
vendored
@ -1 +1 @@
|
||||
Subproject commit f331597bc24b9a1a3f62ac67e5af1927fb103918
|
||||
Subproject commit c9793a4666d21608b1b28d0b67aaa7f7fd8b8031
|
Reference in New Issue
Block a user