macos: add necessary functions for variation axes querying

This commit is contained in:
Mitchell Hashimoto
2023-08-25 22:24:45 -07:00
parent decdf49a2b
commit fb0f80f9ca
2 changed files with 38 additions and 1 deletions

View File

@@ -24,7 +24,7 @@ pub const Array = opaque {
/// constness so that further API calls work correctly. The Foundation
/// API doesn't properly mark things const/non-const.
pub fn getValueAtIndex(self: *Array, comptime T: type, idx: usize) *T {
return @ptrCast(CFArrayGetValueAtIndex(self, idx));
return @ptrCast(@alignCast(CFArrayGetValueAtIndex(self, idx)));
}
pub extern "c" fn CFArrayCreate(