authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-02-06 04:38:35 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-02-06 04:38:35 -08:00
logf4d577e8a7d0cd5e70d8ebceb1b813ddc57ce665
tree647b6df2579e48da37e3301455c0cd6b8b407dfb
parent21ea23271a2e10f81cd993d4065d7a5a846e1099

globalOption: match signature of old std.meta.globalOption


1 files changed, 1 insertions(+), 1 deletions(-)

src/globalOption.zig+1-1
...@@ -3,7 +3,7 @@ const string = []const u8;...@@ -3,7 +3,7 @@ const string = []const u8;
3const extras = @import("./lib.zig");3const extras = @import("./lib.zig");
4const root = @import("root");4const root = @import("root");
55
6pub fn globalOption(comptime T: type, comptime name: []const u8) ?T {6pub fn globalOption(comptime name: []const u8, comptime T: type) ?T {
7 if (!@hasDecl(root, name)) return null;7 if (!@hasDecl(root, name)) return null;
8 return @as(T, @field(root, name));8 return @as(T, @field(root, name));
9}9}