| author | |
| committer | |
| log | 89f1bfa5b487d95d92b0f518532ac9c9df0434b5 |
| tree | fe1881ed5b437dbb59b6a90a8d30cc2655f89d5e |
| parent | ab4eeb770a0af411d525616dcdbfa4a8491f8ac0 |
| parent | 7205756a69b2fb8641e02d23592ac12206f98052 |
| signature |
Fix a few compilation errors4 files changed, 4 insertions(+), 4 deletions(-)
lib/std/Build/Cache/Path.zig+1-1| ... | @@ -58,7 +58,7 @@ pub fn openFile( | ... | @@ -58,7 +58,7 @@ pub fn openFile( |
| 58 | return p.root_dir.handle.openFile(joined_path, flags); | 58 | return p.root_dir.handle.openFile(joined_path, flags); |
| 59 | } | 59 | } |
| 60 | 60 | ||
| 61 | pub fn makeOpenPath(p: Path, sub_path: []const u8, opts: fs.OpenDirOptions) !fs.Dir { | 61 | pub fn makeOpenPath(p: Path, sub_path: []const u8, opts: fs.Dir.OpenDirOptions) !fs.Dir { |
| 62 | var buf: [fs.max_path_bytes]u8 = undefined; | 62 | var buf: [fs.max_path_bytes]u8 = undefined; |
| 63 | const joined_path = if (p.sub_path.len == 0) sub_path else p: { | 63 | const joined_path = if (p.sub_path.len == 0) sub_path else p: { |
| 64 | break :p std.fmt.bufPrint(&buf, "{s}" ++ fs.path.sep_str ++ "{s}", .{ | 64 | break :p std.fmt.bufPrint(&buf, "{s}" ++ fs.path.sep_str ++ "{s}", .{ |
lib/std/Build/Step/TranslateC.zig+1-1| ... | @@ -107,7 +107,7 @@ pub fn addCheckFile(translate_c: *TranslateC, expected_matches: []const []const | ... | @@ -107,7 +107,7 @@ pub fn addCheckFile(translate_c: *TranslateC, expected_matches: []const []const |
| 107 | /// If the value is omitted, it is set to 1. | 107 | /// If the value is omitted, it is set to 1. |
| 108 | /// `name` and `value` need not live longer than the function call. | 108 | /// `name` and `value` need not live longer than the function call. |
| 109 | pub fn defineCMacro(translate_c: *TranslateC, name: []const u8, value: ?[]const u8) void { | 109 | pub fn defineCMacro(translate_c: *TranslateC, name: []const u8, value: ?[]const u8) void { |
| 110 | const macro = std.Build.constructranslate_cMacro(translate_c.step.owner.allocator, name, value); | 110 | const macro = translate_c.step.owner.fmt("{s}={s}", .{ name, value orelse "1" }); |
| 111 | translate_c.c_macros.append(macro) catch @panic("OOM"); | 111 | translate_c.c_macros.append(macro) catch @panic("OOM"); |
| 112 | } | 112 | } |
| 113 | 113 |
lib/std/array_hash_map.zig+1-1| ... | @@ -427,7 +427,7 @@ pub fn ArrayHashMap( | ... | @@ -427,7 +427,7 @@ pub fn ArrayHashMap( |
| 427 | /// Set the map to an empty state, making deinitialization a no-op, and | 427 | /// Set the map to an empty state, making deinitialization a no-op, and |
| 428 | /// returning a copy of the original. | 428 | /// returning a copy of the original. |
| 429 | pub fn move(self: *Self) Self { | 429 | pub fn move(self: *Self) Self { |
| 430 | self.pointer_stability.assertUnlocked(); | 430 | self.unmanaged.pointer_stability.assertUnlocked(); |
| 431 | const result = self.*; | 431 | const result = self.*; |
| 432 | self.unmanaged = .{}; | 432 | self.unmanaged = .{}; |
| 433 | return result; | 433 | return result; |
lib/std/coff.zig+1-1| ... | @@ -542,7 +542,7 @@ pub const SectionHeader = extern struct { | ... | @@ -542,7 +542,7 @@ pub const SectionHeader = extern struct { |
| 542 | 542 | ||
| 543 | pub fn setAlignment(self: *SectionHeader, new_alignment: u16) void { | 543 | pub fn setAlignment(self: *SectionHeader, new_alignment: u16) void { |
| 544 | assert(new_alignment > 0 and new_alignment <= 8192); | 544 | assert(new_alignment > 0 and new_alignment <= 8192); |
| 545 | self.flags.ALIGN = std.math.log2(new_alignment); | 545 | self.flags.ALIGN = @intCast(std.math.log2(new_alignment)); |
| 546 | } | 546 | } |
| 547 | 547 | ||
| 548 | pub fn isCode(self: SectionHeader) bool { | 548 | pub fn isCode(self: SectionHeader) bool { |