Lots of 0.14 changes

This commit is contained in:
Mitchell Hashimoto
2025-03-12 09:55:46 -07:00
parent 86d3f18707
commit 0f4d2bb237
67 changed files with 326 additions and 316 deletions

View File

@@ -7,7 +7,7 @@ const Allocator = std.mem.Allocator;
/// Verifies that the running macOS system version is at least the given version.
pub fn isAtLeastVersion(major: i64, minor: i64, patch: i64) bool {
comptime assert(builtin.target.isDarwin());
comptime assert(builtin.target.os.tag.isDarwin());
const NSProcessInfo = objc.getClass("NSProcessInfo").?;
const info = NSProcessInfo.msgSend(objc.Object, objc.sel("processInfo"), .{});
@@ -108,7 +108,7 @@ fn commonDir(
directory: NSSearchPathDirectory,
sub_paths: []const []const u8,
) (error{AppleAPIFailed} || Allocator.Error)![]const u8 {
comptime assert(builtin.target.isDarwin());
comptime assert(builtin.target.os.tag.isDarwin());
const NSFileManager = objc.getClass("NSFileManager").?;
const manager = NSFileManager.msgSend(
@@ -146,7 +146,7 @@ fn commonDir(
}
test "cacheDir paths" {
if (!builtin.target.isDarwin()) return;
if (!builtin.target.os.tag.isDarwin()) return;
const testing = std.testing;
const alloc = testing.allocator;