From 561db69a5507e4c7dade371158b0b3cd355d69f1 Mon Sep 17 00:00:00 2001 From: utox39 Date: Sat, 15 Mar 2025 01:55:23 +0100 Subject: [PATCH] refactor(macos): rename the CoreFoundation import from c_core_foundation to c_cf --- src/macos/macos.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/macos/macos.zig b/src/macos/macos.zig index 8b49780..dcc5668 100644 --- a/src/macos/macos.zig +++ b/src/macos/macos.zig @@ -3,7 +3,7 @@ const utils = @import("./utils.zig"); const c_libproc = @cImport(@cInclude("libproc.h")); const c_sysctl = @cImport(@cInclude("sys/sysctl.h")); const c_iokit = @cImport(@cInclude("IOKit/IOKitLib.h")); -const c_core_foundation = @cImport(@cInclude("CoreFoundation/CoreFoundation.h")); +const c_cf = @cImport(@cInclude("CoreFoundation/CoreFoundation.h")); const c_mach = @cImport(@cInclude("mach/mach.h")); const c_statvfs = @cImport(@cInclude("sys/statvfs.h")); const c_ifaddrs = @cImport(@cInclude("ifaddrs.h")); @@ -231,9 +231,9 @@ pub fn getGpuInfo(allocator: std.mem.Allocator) !GpuInfo { defer c_iokit.CFRelease(gpu_core_count_key); if (c_iokit.CFDictionaryGetValueIfPresent(@as(c_iokit.CFDictionaryRef, @ptrCast(properties_ptr)), gpu_core_count_key, &cores_ref) == c_iokit.TRUE) { - if (c_iokit.CFGetTypeID(cores_ref) == c_core_foundation.CFNumberGetTypeID()) { + if (c_iokit.CFGetTypeID(cores_ref) == c_cf.CFNumberGetTypeID()) { var cores_num: i32 = 0; - if (c_core_foundation.CFNumberGetValue(@as(c_core_foundation.CFNumberRef, @ptrCast(cores_ref)), c_core_foundation.kCFNumberIntType, &cores_num) == c_core_foundation.TRUE) { + if (c_cf.CFNumberGetValue(@as(c_cf.CFNumberRef, @ptrCast(cores_ref)), c_cf.kCFNumberIntType, &cores_num) == c_cf.TRUE) { gpu_info.gpu_cores = cores_num; } }