mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
libuv: fix self-dependent zig error
This commit is contained in:
@ -9,10 +9,12 @@ const Loop = @import("Loop.zig");
|
|||||||
pub fn Handle(comptime T: type) type {
|
pub fn Handle(comptime T: type) type {
|
||||||
// 1. T should be a struct
|
// 1. T should be a struct
|
||||||
// 2. First field should be the handle pointer
|
// 2. First field should be the handle pointer
|
||||||
const tInfo = @typeInfo(T).Struct;
|
|
||||||
const HandleType = tInfo.fields[0].field_type;
|
|
||||||
|
|
||||||
return struct {
|
return struct {
|
||||||
|
// note: this has to be here: https://github.com/ziglang/zig/issues/11367
|
||||||
|
const tInfo = @typeInfo(T).Struct;
|
||||||
|
const HandleType = tInfo.fields[0].field_type;
|
||||||
|
|
||||||
// Request handle to be closed. close_cb will be called asynchronously
|
// Request handle to be closed. close_cb will be called asynchronously
|
||||||
// after this call. This MUST be called on each handle before memory
|
// after this call. This MUST be called on each handle before memory
|
||||||
// is released. Moreover, the memory can only be released in close_cb
|
// is released. Moreover, the memory can only be released in close_cb
|
||||||
|
Reference in New Issue
Block a user