diff options
| author | Mitchell Hashimoto <m@mitchellh.com> | 2025-07-08 10:02:06 -0700 |
|---|---|---|
| committer | Mitchell Hashimoto <m@mitchellh.com> | 2025-07-09 15:06:24 -0700 |
| commit | d30771ecffb501512cec5ae43d085560e9d61478 (patch) | |
| tree | 87930a7cd5f18dd4bcc5b219ab517a804da1ab2a /pkg | |
| parent | b8f5cf9d52506add7d30cacc2142a79949f76ea3 (diff) | |
pkg/macos: use new @ptrcast for os.log
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/macos/os/log.zig | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/pkg/macos/os/log.zig b/pkg/macos/os/log.zig index 8a399b73e..32ecb3296 100644 --- a/pkg/macos/os/log.zig +++ b/pkg/macos/os/log.zig @@ -8,10 +8,10 @@ pub const Log = opaque { subsystem: [:0]const u8, category: [:0]const u8, ) *Log { - return @as(?*Log, @ptrFromInt(@intFromPtr(c.os_log_create( + return @ptrCast(c.os_log_create( subsystem.ptr, category.ptr, - )))).?; + ).?); } pub fn release(self: *Log) void { @@ -32,7 +32,11 @@ pub const Log = opaque { comptime format: []const u8, args: anytype, ) void { - const str = nosuspend std.fmt.allocPrintZ(alloc, format, args) catch return; + const str = nosuspend std.fmt.allocPrintZ( + alloc, + format, + args, + ) catch return; defer alloc.free(str); zig_os_log_with_type(self, typ, str.ptr); } |
