mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2025-01-21 13:31:53 +01:00
work around zig json bug
This commit is contained in:
parent
64b8b9e715
commit
3cd8cdb2ce
3 changed files with 5 additions and 3 deletions
|
@ -17,7 +17,9 @@ pub fn confgenGet(comptime T: type, root_path: []const u8, alloc: std.mem.Alloca
|
|||
.init(alloc, buf_reader.reader());
|
||||
defer reader.deinit();
|
||||
|
||||
const ret = try std.json.parseFromTokenSource(T, alloc, &reader, confgen_json_opt);
|
||||
|
||||
// We just grab the value from the parse result as this data will almost certainly have been
|
||||
// allocated with the builder's arena anyways.
|
||||
return (try std.json.parseFromTokenSource(T, alloc, &reader, confgen_json_opt)).value;
|
||||
return ret.value;
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ pub fn build(b: *std.build.Builder) !void {
|
|||
const znvim_dep = b.dependency("znvim", .{ .target = target, .optimize = mode });
|
||||
|
||||
const cg_opt = try common.confgenGet(struct {
|
||||
term_font: []const u8,
|
||||
term_font: []u8, // TODO: this being non-const is a workaround for an std bug
|
||||
}, "..", b.allocator);
|
||||
|
||||
const opts = b.addOptions();
|
||||
|
|
|
@ -17,7 +17,7 @@ pub fn build(b: *std.build.Builder) !void {
|
|||
exe.addModule("ansi-term", b.dependency("ansi_term", .{}).module("ansi-term"));
|
||||
|
||||
const cg_opt = try common.confgenGet(struct {
|
||||
gtk_theme: []const u8,
|
||||
gtk_theme: []u8, // TODO: this being non-const is a workaround for an std bug
|
||||
}, "../..", b.allocator);
|
||||
|
||||
const opts = b.addOptions();
|
||||
|
|
Loading…
Add table
Reference in a new issue