fix: stage2 compatibility
This commit is contained in:
parent
d897a7ee86
commit
e3aa0a9533
1 changed files with 6 additions and 2 deletions
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue