mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
pkg/libuv: fix stage2 compilation issues
This commit is contained in:
@ -24,12 +24,16 @@ cond: Cond,
|
||||
ready: bool = false,
|
||||
terminate: BoolAtomic,
|
||||
sleeping: BoolAtomic,
|
||||
callback: fn () void,
|
||||
callback: std.meta.FnPtr(fn () void),
|
||||
thread: ?Thread,
|
||||
|
||||
/// Initialize a new embedder. The callback is called when libuv should
|
||||
/// tick. The callback should be as fast as possible.
|
||||
pub fn init(alloc: Allocator, loop: Loop, callback: fn () void) !Embed {
|
||||
pub fn init(
|
||||
alloc: Allocator,
|
||||
loop: Loop,
|
||||
callback: std.meta.FnPtr(fn () void),
|
||||
) !Embed {
|
||||
return Embed{
|
||||
.loop = loop,
|
||||
.mutex = try Mutex.init(alloc),
|
||||
|
@ -96,10 +96,12 @@ pub fn Stream(comptime T: type) type {
|
||||
});
|
||||
|
||||
if (result) |slice| {
|
||||
buf.* = @bitCast(c.uv_buf_t, slice);
|
||||
buf.* = .{
|
||||
.base = slice.ptr,
|
||||
.len = slice.len,
|
||||
};
|
||||
} else {
|
||||
buf.*.base = null;
|
||||
buf.*.len = 0;
|
||||
buf.* = .{ .base = null, .len = 0 };
|
||||
}
|
||||
}
|
||||
|
||||
@ -112,7 +114,7 @@ pub fn Stream(comptime T: type) type {
|
||||
@call(.{ .modifier = .always_inline }, read_cb, .{
|
||||
¶m,
|
||||
cbnread,
|
||||
@bitCast([]const u8, cbbuf.*),
|
||||
cbbuf.*.base[0..cbbuf.*.len],
|
||||
});
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user