authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-07-08 16:58:32-04:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2024-07-08 16:58:32-04:00
log89f1bfa5b487d95d92b0f518532ac9c9df0434b5
treefe1881ed5b437dbb59b6a90a8d30cc2655f89d5e
parentab4eeb770a0af411d525616dcdbfa4a8491f8ac0
parent7205756a69b2fb8641e02d23592ac12206f98052
signaturebadge-check Signed by PGP key B5690EEEBB952194

Merge pull request #20526 from der-teufel-programming/fix-comp-errs

Fix a few compilation errors

4 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}
6060
61pub fn makeOpenPath(p: Path, sub_path: []const u8, opts: fs.OpenDirOptions) !fs.Dir {61pub 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.
109pub fn defineCMacro(translate_c: *TranslateC, name: []const u8, value: ?[]const u8) void {109pub 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}
113113
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, and427 /// 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 {
542542
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 }
547547
548 pub fn isCode(self: SectionHeader) bool {548 pub fn isCode(self: SectionHeader) bool {