commit 06108bc2948c70884037f64dd333fae93f07df2c
parent 7c7ee7b8161cddf83572f27b757f33dcf541a3af
Author: Ashymad <szymon.mikulicz@posteo.net>
Date: Thu, 22 Feb 2024 00:03:41 +0100
Update to zig 0.12-dev
Diffstat:
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/zlox/build.zig b/zlox/build.zig
@@ -30,7 +30,7 @@ pub fn build(b: *std.Build) void {
}).module("linenoise");
// your executable config
- exe.addModule("linenoize", linenoize); // <== for zig project
+ exe.root_module.addImport("linenoize", linenoize);
// This declares intent for the executable to be installed into the
// standard location when the user invokes the "install" step (the default
diff --git a/zlox/build.zig.zon b/zlox/build.zig.zon
@@ -7,7 +7,7 @@
.dependencies = .{
.linenoize = .{
.url = "https://github.com/joachimschmidt557/linenoize/archive/refs/heads/master.tar.gz",
- .hash = "122095273d370fe3a29c2cd98027bae899065db6d759f3eacf049c4941af113b099c",
+ .hash = "12201240f2e3bd999a7846b8d408c2b59243f2ea427efe5cdb99091d28bb9ebc9287",
},
},
}
diff --git a/zlox/src/main.zig b/zlox/src/main.zig
@@ -27,7 +27,7 @@ pub fn runFile(allocator: std.mem.Allocator, path: []const u8) anyerror!void {
const file = try std.fs.cwd().openFile(path, .{});
defer file.close();
- var text = try file.reader().readAllAlloc(allocator, 999999);
+ const text = try file.reader().readAllAlloc(allocator, 999999);
defer allocator.free(text);
}