mirror of
https://github.com/ziglang/zig.git
synced 2026-02-20 16:24:51 +00:00
upgrade to new args api
This commit is contained in:
parent
7c91a055c1
commit
18b8a625f5
@ -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);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user