| author | |
| committer | |
| log | d87b13f2f7cef04058537c8bfeb1ceda1a067e73 |
| tree | b1c24137bf2f4c179f4f6c9007861c5ab8638e60 |
| parent | 6936243ee1b933cba5d5e86c398ec39865e4db28 |
| signature |
5 files changed, 13 insertions(+), 13 deletions(-)
lib/std/coff.zig+3-3| ... | ... | @@ -61,7 +61,7 @@ pub const Coff = struct { |
| 61 | 61 | |
| 62 | 62 | var magic: [2]u8 = undefined; |
| 63 | 63 | try in.readNoEof(magic[0..]); |
| 64 | if (!mem.eql(u8, magic, "MZ")) | |
| 64 | if (!mem.eql(u8, &magic, "MZ")) | |
| 65 | 65 | return error.InvalidPEMagic; |
| 66 | 66 | |
| 67 | 67 | // Seek to PE File Header (coff header) |
| ... | ... | @@ -71,7 +71,7 @@ pub const Coff = struct { |
| 71 | 71 | |
| 72 | 72 | var pe_header_magic: [4]u8 = undefined; |
| 73 | 73 | try in.readNoEof(pe_header_magic[0..]); |
| 74 | if (!mem.eql(u8, pe_header_magic, [_]u8{ 'P', 'E', 0, 0 })) | |
| 74 | if (!mem.eql(u8, &pe_header_magic, &[_]u8{ 'P', 'E', 0, 0 })) | |
| 75 | 75 | return error.InvalidPEHeader; |
| 76 | 76 | |
| 77 | 77 | self.coff_header = CoffHeader{ |
| ... | ... | @@ -163,7 +163,7 @@ pub const Coff = struct { |
| 163 | 163 | var cv_signature: [4]u8 = undefined; // CodeView signature |
| 164 | 164 | try in.readNoEof(cv_signature[0..]); |
| 165 | 165 | // 'RSDS' indicates PDB70 format, used by lld. |
| 166 | if (!mem.eql(u8, cv_signature, "RSDS")) | |
| 166 | if (!mem.eql(u8, &cv_signature, "RSDS")) | |
| 167 | 167 | return error.InvalidPEMagic; |
| 168 | 168 | try in.readNoEof(self.guid[0..]); |
| 169 | 169 | self.age = try in.readIntLittle(u32); |
lib/std/debug.zig+3-3| ... | ... | @@ -825,7 +825,7 @@ fn openSelfDebugInfoWindows(allocator: *mem.Allocator) !DebugInfo { |
| 825 | 825 | const len = try di.coff.getPdbPath(path_buf[0..]); |
| 826 | 826 | const raw_path = path_buf[0..len]; |
| 827 | 827 | |
| 828 | const path = try fs.path.resolve(allocator, [_][]const u8{raw_path}); | |
| 828 | const path = try fs.path.resolve(allocator, &[_][]const u8{raw_path}); | |
| 829 | 829 | |
| 830 | 830 | try di.pdb.openFile(di.coff, path); |
| 831 | 831 | |
| ... | ... | @@ -834,10 +834,10 @@ fn openSelfDebugInfoWindows(allocator: *mem.Allocator) !DebugInfo { |
| 834 | 834 | const signature = try pdb_stream.stream.readIntLittle(u32); |
| 835 | 835 | const age = try pdb_stream.stream.readIntLittle(u32); |
| 836 | 836 | var guid: [16]u8 = undefined; |
| 837 | try pdb_stream.stream.readNoEof(guid[0..]); | |
| 837 | try pdb_stream.stream.readNoEof(&guid); | |
| 838 | 838 | if (version != 20000404) // VC70, only value observed by LLVM team |
| 839 | 839 | return error.UnknownPDBVersion; |
| 840 | if (!mem.eql(u8, di.coff.guid, guid) or di.coff.age != age) | |
| 840 | if (!mem.eql(u8, &di.coff.guid, &guid) or di.coff.age != age) | |
| 841 | 841 | return error.PDBMismatch; |
| 842 | 842 | // We validated the executable and pdb match. |
| 843 | 843 |
lib/std/os.zig+2-2| ... | ... | @@ -1569,8 +1569,8 @@ pub fn isCygwinPty(handle: fd_t) bool { |
| 1569 | 1569 | const name_info = @ptrCast(*const windows.FILE_NAME_INFO, &name_info_bytes[0]); |
| 1570 | 1570 | const name_bytes = name_info_bytes[size .. size + @as(usize, name_info.FileNameLength)]; |
| 1571 | 1571 | const name_wide = @bytesToSlice(u16, name_bytes); |
| 1572 | return mem.indexOf(u16, name_wide, [_]u16{ 'm', 's', 'y', 's', '-' }) != null or | |
| 1573 | mem.indexOf(u16, name_wide, [_]u16{ '-', 'p', 't', 'y' }) != null; | |
| 1572 | return mem.indexOf(u16, name_wide, &[_]u16{ 'm', 's', 'y', 's', '-' }) != null or | |
| 1573 | mem.indexOf(u16, name_wide, &[_]u16{ '-', 'p', 't', 'y' }) != null; | |
| 1574 | 1574 | } |
| 1575 | 1575 | |
| 1576 | 1576 | pub const SocketError = error{ |
lib/std/os/windows.zig+3-3| ... | ... | @@ -932,9 +932,9 @@ pub fn wToPrefixedFileW(s: []const u16) ![PATH_MAX_WIDE:0]u16 { |
| 932 | 932 | // TODO https://github.com/ziglang/zig/issues/2765 |
| 933 | 933 | var result: [PATH_MAX_WIDE:0]u16 = undefined; |
| 934 | 934 | |
| 935 | const start_index = if (mem.startsWith(u16, s, [_]u16{ '\\', '?' })) 0 else blk: { | |
| 935 | const start_index = if (mem.startsWith(u16, s, &[_]u16{ '\\', '?' })) 0 else blk: { | |
| 936 | 936 | const prefix = [_]u16{ '\\', '?', '?', '\\' }; |
| 937 | mem.copy(u16, result[0..], prefix); | |
| 937 | mem.copy(u16, result[0..], &prefix); | |
| 938 | 938 | break :blk prefix.len; |
| 939 | 939 | }; |
| 940 | 940 | const end_index = start_index + s.len; |
| ... | ... | @@ -961,7 +961,7 @@ pub fn sliceToPrefixedSuffixedFileW(s: []const u8, comptime suffix: []const u16) |
| 961 | 961 | } |
| 962 | 962 | const start_index = if (mem.startsWith(u8, s, "\\?") or !std.fs.path.isAbsolute(s)) 0 else blk: { |
| 963 | 963 | const prefix = [_]u16{ '\\', '?', '?', '\\' }; |
| 964 | mem.copy(u16, result[0..], prefix); | |
| 964 | mem.copy(u16, result[0..], &prefix); | |
| 965 | 965 | break :blk prefix.len; |
| 966 | 966 | }; |
| 967 | 967 | const end_index = start_index + try std.unicode.utf8ToUtf16Le(result[start_index..], s); |
lib/std/pdb.zig+2-2| ... | ... | @@ -500,7 +500,7 @@ const Msf = struct { |
| 500 | 500 | const superblock = try in.readStruct(SuperBlock); |
| 501 | 501 | |
| 502 | 502 | // Sanity checks |
| 503 | if (!mem.eql(u8, superblock.FileMagic, SuperBlock.file_magic)) | |
| 503 | if (!mem.eql(u8, &superblock.FileMagic, SuperBlock.file_magic)) | |
| 504 | 504 | return error.InvalidDebugInfo; |
| 505 | 505 | if (superblock.FreeBlockMapBlock != 1 and superblock.FreeBlockMapBlock != 2) |
| 506 | 506 | return error.InvalidDebugInfo; |
| ... | ... | @@ -546,7 +546,7 @@ const Msf = struct { |
| 546 | 546 | const size = stream_sizes[i]; |
| 547 | 547 | if (size == 0) { |
| 548 | 548 | stream.* = MsfStream{ |
| 549 | .blocks = [_]u32{}, | |
| 549 | .blocks = &[_]u32{}, | |
| 550 | 550 | }; |
| 551 | 551 | } else { |
| 552 | 552 | var blocks = try allocator.alloc(u32, size); |