Skip to content

Commit d037442

Browse files
committed
Take higher level CFAllocator instead of CFAllocatorRef
1 parent e78ac6f commit d037442

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

system-configuration/src/preferences.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
//! [`SCPreferences`]: https://developer.apple.com/documentation/systemconfiguration/scpreferences-ft8
1414
1515

16-
use core_foundation::base::{CFAllocatorRef, TCFType};
16+
use core_foundation::base::{CFAllocator, TCFType};
1717
use core_foundation::string::CFString;
1818

1919
pub use system_configuration_sys::preferences::*;
@@ -50,7 +50,7 @@ impl SCPreferences {
5050
///
5151
/// [SCPreferencesCreate]: https://developer.apple.com/documentation/systemconfiguration/1516807-scpreferencescreate?language=objc
5252
pub fn with_allocator(
53-
allocator: CFAllocatorRef,
53+
allocator: &CFAllocator,
5454
calling_process_name: &CFString,
5555
prefs_id: Option<&CFString>,
5656
) -> Self {
@@ -61,7 +61,7 @@ impl SCPreferences {
6161

6262
unsafe {
6363
SCPreferences::wrap_under_create_rule(SCPreferencesCreate(
64-
allocator,
64+
allocator.as_concrete_TypeRef(),
6565
calling_process_name.as_concrete_TypeRef(),
6666
prefs_id_ptr,
6767
))

0 commit comments

Comments
 (0)