diff options
| author | Mitchell Hashimoto <m@mitchellh.com> | 2025-03-12 10:13:31 -0700 |
|---|---|---|
| committer | Mitchell Hashimoto <m@mitchellh.com> | 2025-03-12 10:15:14 -0700 |
| commit | 7e9be00924144950ab6100cb7136e91c6abb403e (patch) | |
| tree | cd9d1865f9c71fc13cd9e662761372d2f9d11989 /src | |
| parent | 43467690f310e79629c43926cb13a3fb51b50394 (diff) | |
working on macos
Diffstat (limited to 'src')
| -rw-r--r-- | src/Command.zig | 2 | ||||
| -rw-r--r-- | src/input/KeymapDarwin.zig | 2 | ||||
| -rw-r--r-- | src/inspector/Inspector.zig | 2 | ||||
| -rw-r--r-- | src/inspector/page.zig | 2 | ||||
| -rw-r--r-- | src/os/file.zig | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/src/Command.zig b/src/Command.zig index 6e30eae13..ffc44423f 100644 --- a/src/Command.zig +++ b/src/Command.zig @@ -392,7 +392,7 @@ pub fn expandPath(alloc: Allocator, cmd: []const u8) !?[]u8 { const PATH = switch (builtin.os.tag) { .windows => blk: { const win_path = std.process.getenvW(std.unicode.utf8ToUtf16LeStringLiteral("PATH")) orelse return null; - const path = try std.unicode.utf16leToUtf8Alloc(alloc, win_path); + const path = try std.unicode.utf16LeToUtf8Alloc(alloc, win_path); break :blk path; }, else => std.posix.getenvZ("PATH") orelse return null, diff --git a/src/input/KeymapDarwin.zig b/src/input/KeymapDarwin.zig index 154f648a6..53c305ab1 100644 --- a/src/input/KeymapDarwin.zig +++ b/src/input/KeymapDarwin.zig @@ -195,7 +195,7 @@ pub fn translate( } else false; // Convert the utf16 to utf8 - const len = try std.unicode.utf16leToUtf8(out, char[0..char_count]); + const len = try std.unicode.utf16LeToUtf8(out, char[0..char_count]); return .{ .text = out[0..len], .composing = composing, diff --git a/src/inspector/Inspector.zig b/src/inspector/Inspector.zig index 53a602abc..edc204886 100644 --- a/src/inspector/Inspector.zig +++ b/src/inspector/Inspector.zig @@ -390,7 +390,7 @@ fn renderScreenWindow(self: *Inspector) void { if (kitty_flags.int() != 0) { const Flags = @TypeOf(kitty_flags); - inline for (@typeInfo(Flags).Struct.fields) |field| { + inline for (@typeInfo(Flags).@"struct".fields) |field| { { const value = @field(kitty_flags, field.name); diff --git a/src/inspector/page.zig b/src/inspector/page.zig index bb95d59b9..0b8609d5a 100644 --- a/src/inspector/page.zig +++ b/src/inspector/page.zig @@ -28,7 +28,7 @@ pub fn render(page: *const terminal.Page) void { { _ = cimgui.c.igTableSetColumnIndex(1); cimgui.c.igText("%d bytes (%d KiB)", page.memory.len, units.toKibiBytes(page.memory.len)); - cimgui.c.igText("%d VM pages", page.memory.len / std.mem.page_size); + cimgui.c.igText("%d VM pages", page.memory.len / std.heap.page_size_min); } } { diff --git a/src/os/file.zig b/src/os/file.zig index 875dd2c25..0f25503a2 100644 --- a/src/os/file.zig +++ b/src/os/file.zig @@ -59,7 +59,7 @@ pub fn allocTmpDir(allocator: std.mem.Allocator) ?[]const u8 { if (builtin.os.tag == .windows) { // TODO: what is a good fallback path on windows? const v = std.process.getenvW(std.unicode.utf8ToUtf16LeStringLiteral("TMP")) orelse return null; - return std.unicode.utf16leToUtf8Alloc(allocator, v) catch |e| { + return std.unicode.utf16LeToUtf8Alloc(allocator, v) catch |e| { log.warn("failed to convert temp dir path from windows string: {}", .{e}); return null; }; |
