diff --git a/src/main.zig b/src/main.zig index 3679317..c4cff53 100644 --- a/src/main.zig +++ b/src/main.zig @@ -5,7 +5,7 @@ const testing = std.testing; pub fn log( /// The value returned by @cImport. /// Must include the "glib.h" or "glib/gmessages.h" header. - c: anytype, + comptime c: type, /// The name of the module used for the log output. comptime module_name: []const u8, /// The length of the buffer used for the formatted output. @@ -15,7 +15,7 @@ pub fn log( return LogStruct(c, module_name, buf_size).log; } -fn LogStruct(c: anytype, comptime module_name: []const u8, comptime buf_size: usize) type { +fn LogStruct(comptime c: type, comptime module_name: []const u8, comptime buf_size: usize) type { return struct { threadlocal var fmt_buf: [buf_size]u8 = undefined; @@ -66,3 +66,7 @@ fn LogStruct(c: anytype, comptime module_name: []const u8, comptime buf_size: us } }; } + +test { + std.testing.refAllDecls(@This()); +}