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(
5858 return p.root_dir.handle.openFile(joined_path, flags);
5959}
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 {
6262 var buf: [fs.max_path_bytes]u8 = undefined;
6363 const joined_path = if (p.sub_path.len == 0) sub_path else p: {
6464 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
107107/// If the value is omitted, it is set to 1.
108108/// `name` and `value` need not live longer than the function call.
109109pub 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" });
111111 translate_c.c_macros.append(macro) catch @panic("OOM");
112112}
113113
lib/std/array_hash_map.zig+1-1
......@@ -427,7 +427,7 @@ pub fn ArrayHashMap(
427427 /// Set the map to an empty state, making deinitialization a no-op, and
428428 /// returning a copy of the original.
429429 pub fn move(self: *Self) Self {
430 self.pointer_stability.assertUnlocked();
430 self.unmanaged.pointer_stability.assertUnlocked();
431431 const result = self.*;
432432 self.unmanaged = .{};
433433 return result;
lib/std/coff.zig+1-1
......@@ -542,7 +542,7 @@ pub const SectionHeader = extern struct {
542542
543543 pub fn setAlignment(self: *SectionHeader, new_alignment: u16) void {
544544 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));
546546 }
547547
548548 pub fn isCode(self: SectionHeader) bool {