| ... | ... | @@ -1,4 +1,5 @@ |
| 1 | 1 | const std = @import("../../index.zig"); |
| 2 | const os = std.os; |
| 2 | 3 | const windows = std.os.windows; |
| 3 | 4 | const assert = std.debug.assert; |
| 4 | 5 | const mem = std.mem; |
| ... | ... | @@ -75,9 +76,9 @@ error PipeBusy; |
| 75 | 76 | /// size buffer is too small, and the provided allocator is null, ::error.NameTooLong is returned. |
| 76 | 77 | /// otherwise if the fixed size buffer is too small, allocator is used to obtain the needed memory. |
| 77 | 78 | pub fn windowsOpen(file_path: []const u8, desired_access: windows.DWORD, share_mode: windows.DWORD, |
| 78 | | creation_disposition: windows.DWORD, flags_and_attrs: windows.DWORD, allocator: ?&Allocator) -> %windows.HANDLE |
| 79 | creation_disposition: windows.DWORD, flags_and_attrs: windows.DWORD, allocator: ?&mem.Allocator) -> %windows.HANDLE |
| 79 | 80 | { |
| 80 | | var stack_buf: [max_noalloc_path_len]u8 = undefined; |
| 81 | var stack_buf: [os.max_noalloc_path_len]u8 = undefined; |
| 81 | 82 | var path0: []u8 = undefined; |
| 82 | 83 | var need_free = false; |
| 83 | 84 | defer if (need_free) (??allocator).free(path0); |