upgrade to new args api

This commit is contained in:
Andrew Kelley 2017-12-06 18:22:52 -05:00
parent 7c91a055c1
commit 18b8a625f5

View File

@ -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);