From 67b5fb918ca98df9039b6abfb4b2fecfcf1d932e Mon Sep 17 00:00:00 2001 From: Robert H Date: Mon, 3 Nov 2025 02:22:57 -0600 Subject: [PATCH] fix: export xev.Stream correctly in main.zig It seems that #177 had a typo that exports `stream.GenericStream` as `xev.Stream`. Export the correct item instead. Also enhance the comptime check to ensure that the exported fields actually have the correct type. --- src/main.zig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.zig b/src/main.zig index 9922b2f..39119a6 100644 --- a/src/main.zig +++ b/src/main.zig @@ -34,7 +34,7 @@ pub const WriteRequest = xev.WriteRequest; pub const Async = xev.Async; pub const File = xev.File; pub const Process = xev.Process; -pub const Stream = stream.GenericStream; +pub const Stream = xev.Stream; pub const Timer = xev.Timer; pub const TCP = xev.TCP; pub const UDP = xev.UDP; @@ -50,6 +50,9 @@ comptime { if (!@hasDecl(main, decl.name)) { @compileError("missing decl: " ++ decl.name); } + if (Decl != @TypeOf(@field(main, decl.name))) { + @compileError("decl has wrong type: " ++ decl.name); + } } }