fix: stage2 compatibility

This commit is contained in:
LordMZTE 2022-09-13 16:58:57 +02:00
parent d897a7ee86
commit e3aa0a9533
Signed by: LordMZTE
GPG Key ID: B64802DC33A64FF6
1 changed files with 6 additions and 2 deletions

View File

@ -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());
}