commit 18b8a625f55f1c9cd325ec1ffb8d6d666c440b86 (tree) parent 7c91a055c120f9fdad122aad294a40a37510a6a6 Author: Andrew Kelley <superjoe30@gmail.com> Date: Wed, 6 Dec 2017 18:22:52 -0500 upgrade to new args api Diffstat:
| M | src-self-hosted/main.zig | | | 5 | ++++- |
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src-self-hosted/main.zig b/src-self-hosted/main.zig @@ -377,7 +377,10 @@ pub fn main2() -> %void { const allocator = &incrementing_allocator.allocator; - const target_file = "input.zig"; // TODO + const args = %return os.argsAlloc(allocator); + defer os.argsFree(allocator, args); + + const target_file = args[1]; const target_file_buf = %return io.readFileAlloc(target_file, allocator);