| author | |
| committer | |
| log | 1ac46fac15953820948b77b94083828f84673641 |
| tree | 057f8630fc4db8bc02e5e4a56d483d75fcc23fe9 |
| parent | 336d81894da2c34a77cffd1bf903ad9e4dcaa7aa |
* fix fstat wrong on darwin
* move std.debug.global_allocator to std.debug.global_allocator_state and make it private
* add std.debug.global_allocator as a pointer (to upgrade your zig code remove
the '&')13 files changed, 96 insertions(+), 42 deletions(-)
std/array_list.zig+1-1| ... | @@ -101,7 +101,7 @@ pub fn ArrayList(comptime T: type) -> type{ | ... | @@ -101,7 +101,7 @@ pub fn ArrayList(comptime T: type) -> type{ |
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | test "basic ArrayList test" { | 103 | test "basic ArrayList test" { |
| 104 | var list = ArrayList(i32).init(&debug.global_allocator); | 104 | var list = ArrayList(i32).init(debug.global_allocator); |
| 105 | defer list.deinit(); | 105 | defer list.deinit(); |
| 106 | 106 | ||
| 107 | {var i: usize = 0; while (i < 10) : (i += 1) { | 107 | {var i: usize = 0; while (i < 10) : (i += 1) { |
std/buffer.zig+1-1| ... | @@ -135,7 +135,7 @@ pub const Buffer = struct { | ... | @@ -135,7 +135,7 @@ pub const Buffer = struct { |
| 135 | test "simple Buffer" { | 135 | test "simple Buffer" { |
| 136 | const cstr = @import("cstr.zig"); | 136 | const cstr = @import("cstr.zig"); |
| 137 | 137 | ||
| 138 | var buf = %%Buffer.init(&debug.global_allocator, ""); | 138 | var buf = %%Buffer.init(debug.global_allocator, ""); |
| 139 | assert(buf.len() == 0); | 139 | assert(buf.len() == 0); |
| 140 | %%buf.append("hello"); | 140 | %%buf.append("hello"); |
| 141 | %%buf.appendByte(' '); | 141 | %%buf.appendByte(' '); |
std/c/darwin.zig+14-12| ... | @@ -6,26 +6,28 @@ pub const _errno = __error; | ... | @@ -6,26 +6,28 @@ pub const _errno = __error; |
| 6 | 6 | ||
| 7 | /// Renamed to Stat to not conflict with the stat function. | 7 | /// Renamed to Stat to not conflict with the stat function. |
| 8 | pub const Stat = extern struct { | 8 | pub const Stat = extern struct { |
| 9 | dev: u32, | 9 | dev: i32, |
| 10 | mode: u16, | 10 | mode: u16, |
| 11 | nlink: u16, | 11 | nlink: u16, |
| 12 | ino: u64, | 12 | ino: u64, |
| 13 | uid: u32, | 13 | uid: u32, |
| 14 | gid: u32, | 14 | gid: u32, |
| 15 | rdev: u64, | 15 | rdev: i32, |
| 16 | 16 | atime: usize, | |
| 17 | atim: timespec, | 17 | atimensec: usize, |
| 18 | mtim: timespec, | 18 | mtime: usize, |
| 19 | ctim: timespec, | 19 | mtimensec: usize, |
| 20 | 20 | ctime: usize, | |
| 21 | size: u64, | 21 | ctimensec: usize, |
| 22 | blocks: u64, | 22 | birthtime: usize, |
| 23 | blksize: u32, | 23 | birthtimensec: usize, |
| 24 | size: i64, | ||
| 25 | blocks: i64, | ||
| 26 | blksize: i32, | ||
| 24 | flags: u32, | 27 | flags: u32, |
| 25 | gen: u32, | 28 | gen: u32, |
| 26 | lspare: i32, | 29 | lspare: i32, |
| 27 | qspare: [2]u64, | 30 | qspare: [2]i64, |
| 28 | |||
| 29 | }; | 31 | }; |
| 30 | 32 | ||
| 31 | pub const timespec = extern struct { | 33 | pub const timespec = extern struct { |
std/c/index.zig+1| ... | @@ -14,6 +14,7 @@ pub extern "c" fn exit(code: c_int) -> noreturn; | ... | @@ -14,6 +14,7 @@ pub extern "c" fn exit(code: c_int) -> noreturn; |
| 14 | pub extern "c" fn isatty(fd: c_int) -> c_int; | 14 | pub extern "c" fn isatty(fd: c_int) -> c_int; |
| 15 | pub extern "c" fn close(fd: c_int) -> c_int; | 15 | pub extern "c" fn close(fd: c_int) -> c_int; |
| 16 | pub extern "c" fn fstat(fd: c_int, buf: &Stat) -> c_int; | 16 | pub extern "c" fn fstat(fd: c_int, buf: &Stat) -> c_int; |
| 17 | pub extern "c" fn @"fstat$INODE64"(fd: c_int, buf: &Stat) -> c_int; | ||
| 17 | pub extern "c" fn lseek(fd: c_int, offset: isize, whence: c_int) -> isize; | 18 | pub extern "c" fn lseek(fd: c_int, offset: isize, whence: c_int) -> isize; |
| 18 | pub extern "c" fn open(path: &const u8, oflag: c_int, ...) -> c_int; | 19 | pub extern "c" fn open(path: &const u8, oflag: c_int, ...) -> c_int; |
| 19 | pub extern "c" fn raise(sig: c_int) -> c_int; | 20 | pub extern "c" fn raise(sig: c_int) -> c_int; |
std/debug.zig+4-3| ... | @@ -38,7 +38,7 @@ fn getStderrStream() -> %&io.OutStream { | ... | @@ -38,7 +38,7 @@ fn getStderrStream() -> %&io.OutStream { |
| 38 | /// Tries to print a stack trace to stderr, unbuffered, and ignores any error returned. | 38 | /// Tries to print a stack trace to stderr, unbuffered, and ignores any error returned. |
| 39 | pub fn dumpStackTrace() { | 39 | pub fn dumpStackTrace() { |
| 40 | const stderr = getStderrStream() %% return; | 40 | const stderr = getStderrStream() %% return; |
| 41 | writeStackTrace(stderr, &global_allocator, stderr_file.isTty(), 1) %% return; | 41 | writeStackTrace(stderr, global_allocator, stderr_file.isTty(), 1) %% return; |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | /// This function invokes undefined behavior when `ok` is `false`. | 44 | /// This function invokes undefined behavior when `ok` is `false`. |
| ... | @@ -86,7 +86,7 @@ pub fn panic(comptime format: []const u8, args: ...) -> noreturn { | ... | @@ -86,7 +86,7 @@ pub fn panic(comptime format: []const u8, args: ...) -> noreturn { |
| 86 | 86 | ||
| 87 | const stderr = getStderrStream() %% os.abort(); | 87 | const stderr = getStderrStream() %% os.abort(); |
| 88 | stderr.print(format ++ "\n", args) %% os.abort(); | 88 | stderr.print(format ++ "\n", args) %% os.abort(); |
| 89 | writeStackTrace(stderr, &global_allocator, stderr_file.isTty(), 1) %% os.abort(); | 89 | writeStackTrace(stderr, global_allocator, stderr_file.isTty(), 1) %% os.abort(); |
| 90 | 90 | ||
| 91 | os.abort(); | 91 | os.abort(); |
| 92 | } | 92 | } |
| ... | @@ -967,7 +967,8 @@ fn readILeb128(in_stream: &io.InStream) -> %i64 { | ... | @@ -967,7 +967,8 @@ fn readILeb128(in_stream: &io.InStream) -> %i64 { |
| 967 | } | 967 | } |
| 968 | } | 968 | } |
| 969 | 969 | ||
| 970 | pub var global_allocator = mem.Allocator { | 970 | pub const global_allocator = &global_allocator_state; |
| 971 | var global_allocator_state = mem.Allocator { | ||
| 971 | .allocFn = globalAlloc, | 972 | .allocFn = globalAlloc, |
| 972 | .reallocFn = globalRealloc, | 973 | .reallocFn = globalRealloc, |
| 973 | .freeFn = globalFree, | 974 | .freeFn = globalFree, |
std/hash_map.zig+1-1| ... | @@ -232,7 +232,7 @@ pub fn HashMap(comptime K: type, comptime V: type, | ... | @@ -232,7 +232,7 @@ pub fn HashMap(comptime K: type, comptime V: type, |
| 232 | } | 232 | } |
| 233 | 233 | ||
| 234 | test "basicHashMapTest" { | 234 | test "basicHashMapTest" { |
| 235 | var map = HashMap(i32, i32, hash_i32, eql_i32).init(&debug.global_allocator); | 235 | var map = HashMap(i32, i32, hash_i32, eql_i32).init(debug.global_allocator); |
| 236 | defer map.deinit(); | 236 | defer map.deinit(); |
| 237 | 237 | ||
| 238 | assert(%%map.put(1, 11) == null); | 238 | assert(%%map.put(1, 11) == null); |
std/io.zig+6| ... | @@ -20,6 +20,12 @@ const fmt = std.fmt; | ... | @@ -20,6 +20,12 @@ const fmt = std.fmt; |
| 20 | const is_posix = builtin.os != builtin.Os.windows; | 20 | const is_posix = builtin.os != builtin.Os.windows; |
| 21 | const is_windows = builtin.os == builtin.Os.windows; | 21 | const is_windows = builtin.os == builtin.Os.windows; |
| 22 | 22 | ||
| 23 | test "import io tests" { | ||
| 24 | comptime { | ||
| 25 | _ = @import("io_test.zig"); | ||
| 26 | } | ||
| 27 | } | ||
| 28 | |||
| 23 | /// The function received invalid input at runtime. An Invalid error means a | 29 | /// The function received invalid input at runtime. An Invalid error means a |
| 24 | /// bug in the program that called the function. | 30 | /// bug in the program that called the function. |
| 25 | error Invalid; | 31 | error Invalid; |
std/io_test.zig created+45| ... | @@ -0,0 +1,45 @@ | ||
| 1 | const std = @import("index.zig"); | ||
| 2 | const io = std.io; | ||
| 3 | const allocator = std.debug.global_allocator; | ||
| 4 | const Rand = std.rand.Rand; | ||
| 5 | const assert = std.debug.assert; | ||
| 6 | const mem = std.mem; | ||
| 7 | const os = std.os; | ||
| 8 | |||
| 9 | test "write a file, read it, then delete it" { | ||
| 10 | var data: [1024]u8 = undefined; | ||
| 11 | var rng = Rand.init(1234); | ||
| 12 | rng.fillBytes(data[0..]); | ||
| 13 | const tmp_file_name = "temp_test_file.txt"; | ||
| 14 | { | ||
| 15 | var file = %%io.File.openWrite(tmp_file_name, allocator); | ||
| 16 | defer file.close(); | ||
| 17 | |||
| 18 | var file_out_stream = io.FileOutStream.init(&file); | ||
| 19 | var buf_stream = io.BufferedOutStream.init(&file_out_stream.stream); | ||
| 20 | const st = &buf_stream.stream; | ||
| 21 | %%st.print("begin"); | ||
| 22 | %%st.write(data[0..]); | ||
| 23 | %%st.print("end"); | ||
| 24 | %%buf_stream.flush(); | ||
| 25 | } | ||
| 26 | { | ||
| 27 | var file = %%io.File.openRead(tmp_file_name, allocator); | ||
| 28 | defer file.close(); | ||
| 29 | |||
| 30 | const file_size = %%file.getEndPos(); | ||
| 31 | const expected_file_size = "begin".len + data.len + "end".len; | ||
| 32 | assert(file_size == expected_file_size); | ||
| 33 | |||
| 34 | var file_in_stream = io.FileInStream.init(&file); | ||
| 35 | var buf_stream = io.BufferedInStream.init(&file_in_stream.stream); | ||
| 36 | const st = &buf_stream.stream; | ||
| 37 | const contents = %%st.readAllAlloc(allocator, 2 * 1024); | ||
| 38 | defer allocator.free(contents); | ||
| 39 | |||
| 40 | assert(mem.eql(u8, contents[0.."begin".len], "begin")); | ||
| 41 | assert(mem.eql(u8, contents["begin".len..contents.len - "end".len], data)); | ||
| 42 | assert(mem.eql(u8, contents[contents.len - "end".len ..], "end")); | ||
| 43 | } | ||
| 44 | %%os.deleteFile(allocator, tmp_file_name); | ||
| 45 | } | ||
std/linked_list.zig+1-1| ... | @@ -195,7 +195,7 @@ pub fn LinkedList(comptime T: type) -> type { | ... | @@ -195,7 +195,7 @@ pub fn LinkedList(comptime T: type) -> type { |
| 195 | } | 195 | } |
| 196 | 196 | ||
| 197 | test "basic linked list test" { | 197 | test "basic linked list test" { |
| 198 | const allocator = &debug.global_allocator; | 198 | const allocator = debug.global_allocator; |
| 199 | var list = LinkedList(u32).init(); | 199 | var list = LinkedList(u32).init(); |
| 200 | 200 | ||
| 201 | var one = %%list.createNode(1, allocator); | 201 | var one = %%list.createNode(1, allocator); |
std/mem.zig+2-2| ... | @@ -331,8 +331,8 @@ pub fn join(allocator: &Allocator, sep: u8, strings: ...) -> %[]u8 { | ... | @@ -331,8 +331,8 @@ pub fn join(allocator: &Allocator, sep: u8, strings: ...) -> %[]u8 { |
| 331 | } | 331 | } |
| 332 | 332 | ||
| 333 | test "mem.join" { | 333 | test "mem.join" { |
| 334 | assert(eql(u8, %%join(&debug.global_allocator, ',', "a", "b", "c"), "a,b,c")); | 334 | assert(eql(u8, %%join(debug.global_allocator, ',', "a", "b", "c"), "a,b,c")); |
| 335 | assert(eql(u8, %%join(&debug.global_allocator, ',', "a"), "a")); | 335 | assert(eql(u8, %%join(debug.global_allocator, ',', "a"), "a")); |
| 336 | } | 336 | } |
| 337 | 337 | ||
| 338 | test "testStringEquality" { | 338 | test "testStringEquality" { |
std/os/darwin.zig+1-1| ... | @@ -129,7 +129,7 @@ pub fn isatty(fd: i32) -> bool { | ... | @@ -129,7 +129,7 @@ pub fn isatty(fd: i32) -> bool { |
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | pub fn fstat(fd: i32, buf: &c.Stat) -> usize { | 131 | pub fn fstat(fd: i32, buf: &c.Stat) -> usize { |
| 132 | errnoWrap(c.fstat(fd, buf)) | 132 | errnoWrap(c.@"fstat$INODE64"(fd, buf)) |
| 133 | } | 133 | } |
| 134 | 134 | ||
| 135 | pub fn lseek(fd: i32, offset: isize, whence: c_int) -> usize { | 135 | pub fn lseek(fd: i32, offset: isize, whence: c_int) -> usize { |
std/os/index.zig+3-4| ... | @@ -562,7 +562,7 @@ pub fn getCwd(allocator: &Allocator) -> %[]u8 { | ... | @@ -562,7 +562,7 @@ pub fn getCwd(allocator: &Allocator) -> %[]u8 { |
| 562 | 562 | ||
| 563 | test "os.getCwd" { | 563 | test "os.getCwd" { |
| 564 | // at least call it so it gets compiled | 564 | // at least call it so it gets compiled |
| 565 | _ = getCwd(&debug.global_allocator); | 565 | _ = getCwd(debug.global_allocator); |
| 566 | } | 566 | } |
| 567 | 567 | ||
| 568 | pub fn symLink(allocator: &Allocator, existing_path: []const u8, new_path: []const u8) -> %void { | 568 | pub fn symLink(allocator: &Allocator, existing_path: []const u8, new_path: []const u8) -> %void { |
| ... | @@ -1432,10 +1432,10 @@ test "windows arg parsing" { | ... | @@ -1432,10 +1432,10 @@ test "windows arg parsing" { |
| 1432 | fn testWindowsCmdLine(input_cmd_line: &const u8, expected_args: []const []const u8) { | 1432 | fn testWindowsCmdLine(input_cmd_line: &const u8, expected_args: []const []const u8) { |
| 1433 | var it = ArgIteratorWindows.initWithCmdLine(input_cmd_line); | 1433 | var it = ArgIteratorWindows.initWithCmdLine(input_cmd_line); |
| 1434 | for (expected_args) |expected_arg| { | 1434 | for (expected_args) |expected_arg| { |
| 1435 | const arg = %%??it.next(&debug.global_allocator); | 1435 | const arg = %%??it.next(debug.global_allocator); |
| 1436 | assert(mem.eql(u8, arg, expected_arg)); | 1436 | assert(mem.eql(u8, arg, expected_arg)); |
| 1437 | } | 1437 | } |
| 1438 | assert(it.next(&debug.global_allocator) == null); | 1438 | assert(it.next(debug.global_allocator) == null); |
| 1439 | } | 1439 | } |
| 1440 | 1440 | ||
| 1441 | test "std.os" { | 1441 | test "std.os" { |
| ... | @@ -1500,4 +1500,3 @@ pub fn isTty(handle: FileHandle) -> bool { | ... | @@ -1500,4 +1500,3 @@ pub fn isTty(handle: FileHandle) -> bool { |
| 1500 | } | 1500 | } |
| 1501 | } | 1501 | } |
| 1502 | } | 1502 | } |
| 1503 |
std/os/path.zig+16-16| ... | @@ -41,23 +41,23 @@ pub fn joinPosix(allocator: &Allocator, paths: ...) -> %[]u8 { | ... | @@ -41,23 +41,23 @@ pub fn joinPosix(allocator: &Allocator, paths: ...) -> %[]u8 { |
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | test "os.path.join" { | 43 | test "os.path.join" { |
| 44 | assert(mem.eql(u8, %%joinWindows(&debug.global_allocator, "c:\\a\\b", "c"), "c:\\a\\b\\c")); | 44 | assert(mem.eql(u8, %%joinWindows(debug.global_allocator, "c:\\a\\b", "c"), "c:\\a\\b\\c")); |
| 45 | assert(mem.eql(u8, %%joinWindows(&debug.global_allocator, "c:\\a\\b\\", "c"), "c:\\a\\b\\c")); | 45 | assert(mem.eql(u8, %%joinWindows(debug.global_allocator, "c:\\a\\b\\", "c"), "c:\\a\\b\\c")); |
| 46 | 46 | ||
| 47 | assert(mem.eql(u8, %%joinWindows(&debug.global_allocator, "c:\\", "a", "b\\", "c"), "c:\\a\\b\\c")); | 47 | assert(mem.eql(u8, %%joinWindows(debug.global_allocator, "c:\\", "a", "b\\", "c"), "c:\\a\\b\\c")); |
| 48 | assert(mem.eql(u8, %%joinWindows(&debug.global_allocator, "c:\\a\\", "b\\", "c"), "c:\\a\\b\\c")); | 48 | assert(mem.eql(u8, %%joinWindows(debug.global_allocator, "c:\\a\\", "b\\", "c"), "c:\\a\\b\\c")); |
| 49 | 49 | ||
| 50 | assert(mem.eql(u8, %%joinWindows(&debug.global_allocator, | 50 | assert(mem.eql(u8, %%joinWindows(debug.global_allocator, |
| 51 | "c:\\home\\andy\\dev\\zig\\build\\lib\\zig\\std", "io.zig"), | 51 | "c:\\home\\andy\\dev\\zig\\build\\lib\\zig\\std", "io.zig"), |
| 52 | "c:\\home\\andy\\dev\\zig\\build\\lib\\zig\\std\\io.zig")); | 52 | "c:\\home\\andy\\dev\\zig\\build\\lib\\zig\\std\\io.zig")); |
| 53 | 53 | ||
| 54 | assert(mem.eql(u8, %%joinPosix(&debug.global_allocator, "/a/b", "c"), "/a/b/c")); | 54 | assert(mem.eql(u8, %%joinPosix(debug.global_allocator, "/a/b", "c"), "/a/b/c")); |
| 55 | assert(mem.eql(u8, %%joinPosix(&debug.global_allocator, "/a/b/", "c"), "/a/b/c")); | 55 | assert(mem.eql(u8, %%joinPosix(debug.global_allocator, "/a/b/", "c"), "/a/b/c")); |
| 56 | 56 | ||
| 57 | assert(mem.eql(u8, %%joinPosix(&debug.global_allocator, "/", "a", "b/", "c"), "/a/b/c")); | 57 | assert(mem.eql(u8, %%joinPosix(debug.global_allocator, "/", "a", "b/", "c"), "/a/b/c")); |
| 58 | assert(mem.eql(u8, %%joinPosix(&debug.global_allocator, "/a/", "b/", "c"), "/a/b/c")); | 58 | assert(mem.eql(u8, %%joinPosix(debug.global_allocator, "/a/", "b/", "c"), "/a/b/c")); |
| 59 | 59 | ||
| 60 | assert(mem.eql(u8, %%joinPosix(&debug.global_allocator, "/home/andy/dev/zig/build/lib/zig/std", "io.zig"), | 60 | assert(mem.eql(u8, %%joinPosix(debug.global_allocator, "/home/andy/dev/zig/build/lib/zig/std", "io.zig"), |
| 61 | "/home/andy/dev/zig/build/lib/zig/std/io.zig")); | 61 | "/home/andy/dev/zig/build/lib/zig/std/io.zig")); |
| 62 | } | 62 | } |
| 63 | 63 | ||
| ... | @@ -453,7 +453,7 @@ pub fn resolvePosix(allocator: &Allocator, paths: []const []const u8) -> %[]u8 { | ... | @@ -453,7 +453,7 @@ pub fn resolvePosix(allocator: &Allocator, paths: []const []const u8) -> %[]u8 { |
| 453 | } | 453 | } |
| 454 | 454 | ||
| 455 | test "os.path.resolve" { | 455 | test "os.path.resolve" { |
| 456 | const cwd = %%os.getCwd(&debug.global_allocator); | 456 | const cwd = %%os.getCwd(debug.global_allocator); |
| 457 | if (is_windows) { | 457 | if (is_windows) { |
| 458 | assert(mem.eql(u8, testResolveWindows([][]const u8{"."}), cwd)); | 458 | assert(mem.eql(u8, testResolveWindows([][]const u8{"."}), cwd)); |
| 459 | } else { | 459 | } else { |
| ... | @@ -492,11 +492,11 @@ test "os.path.resolvePosix" { | ... | @@ -492,11 +492,11 @@ test "os.path.resolvePosix" { |
| 492 | } | 492 | } |
| 493 | 493 | ||
| 494 | fn testResolveWindows(paths: []const []const u8) -> []u8 { | 494 | fn testResolveWindows(paths: []const []const u8) -> []u8 { |
| 495 | return %%resolveWindows(&debug.global_allocator, paths); | 495 | return %%resolveWindows(debug.global_allocator, paths); |
| 496 | } | 496 | } |
| 497 | 497 | ||
| 498 | fn testResolvePosix(paths: []const []const u8) -> []u8 { | 498 | fn testResolvePosix(paths: []const []const u8) -> []u8 { |
| 499 | return %%resolvePosix(&debug.global_allocator, paths); | 499 | return %%resolvePosix(debug.global_allocator, paths); |
| 500 | } | 500 | } |
| 501 | 501 | ||
| 502 | pub fn dirname(path: []const u8) -> []const u8 { | 502 | pub fn dirname(path: []const u8) -> []const u8 { |
| ... | @@ -899,12 +899,12 @@ test "os.path.relative" { | ... | @@ -899,12 +899,12 @@ test "os.path.relative" { |
| 899 | } | 899 | } |
| 900 | 900 | ||
| 901 | fn testRelativePosix(from: []const u8, to: []const u8, expected_output: []const u8) { | 901 | fn testRelativePosix(from: []const u8, to: []const u8, expected_output: []const u8) { |
| 902 | const result = %%relativePosix(&debug.global_allocator, from, to); | 902 | const result = %%relativePosix(debug.global_allocator, from, to); |
| 903 | assert(mem.eql(u8, result, expected_output)); | 903 | assert(mem.eql(u8, result, expected_output)); |
| 904 | } | 904 | } |
| 905 | 905 | ||
| 906 | fn testRelativeWindows(from: []const u8, to: []const u8, expected_output: []const u8) { | 906 | fn testRelativeWindows(from: []const u8, to: []const u8, expected_output: []const u8) { |
| 907 | const result = %%relativeWindows(&debug.global_allocator, from, to); | 907 | const result = %%relativeWindows(debug.global_allocator, from, to); |
| 908 | assert(mem.eql(u8, result, expected_output)); | 908 | assert(mem.eql(u8, result, expected_output)); |
| 909 | } | 909 | } |
| 910 | 910 | ||
| ... | @@ -1022,5 +1022,5 @@ pub fn real(allocator: &Allocator, pathname: []const u8) -> %[]u8 { | ... | @@ -1022,5 +1022,5 @@ pub fn real(allocator: &Allocator, pathname: []const u8) -> %[]u8 { |
| 1022 | 1022 | ||
| 1023 | test "os.path.real" { | 1023 | test "os.path.real" { |
| 1024 | // at least call it so it gets compiled | 1024 | // at least call it so it gets compiled |
| 1025 | _ = real(&debug.global_allocator, "some_path"); | 1025 | _ = real(debug.global_allocator, "some_path"); |
| 1026 | } | 1026 | } |