Skip to content

Commit

Permalink
Fix breaking change introduced on json API (ziglang/zig#15705)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdmichaud committed May 19, 2023
1 parent 093de8c commit d42a982
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,11 @@ pub fn main() !void {
const ZigEnv = struct {
lib_dir: []const u8,
};
var json_token_stream = std.json.TokenStream.init(result.stdout);
const zig_env = try std.json.parse(ZigEnv, &json_token_stream, .{
.allocator = arena,
const zig_env = try std.json.parseFromSlice(ZigEnv, arena, result.stdout, .{
.ignore_unknown_fields = true,
});
defer std.json.parseFree(ZigEnv, arena, zig_env);

const sys_include = try fs.path.join(arena, &.{ zig_env.lib_dir, "include" });

var in_dir = try fs.cwd().openDir(in_path, .{});
Expand Down

0 comments on commit d42a982

Please sign in to comment.