From 69316790e8dfa63bb178dc5dfb29fce285848d8d Mon Sep 17 00:00:00 2001 From: michaelwright235 Date: Tue, 30 May 2023 23:44:17 +0300 Subject: [PATCH] sys: set: Implement actual callbacks Replaces pointer placeholders with actual function declarations. --- core-foundation-sys/src/set.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/core-foundation-sys/src/set.rs b/core-foundation-sys/src/set.rs index a5cc1b1..41c8585 100644 --- a/core-foundation-sys/src/set.rs +++ b/core-foundation-sys/src/set.rs @@ -9,15 +9,15 @@ use std::os::raw::c_void; -use base::{CFAllocatorRef, CFIndex, CFTypeID, Boolean}; +use base::{CFAllocatorRef, CFIndex, CFTypeID, Boolean, CFHashCode}; +use string::CFStringRef; -pub type CFSetApplierFunction = extern "C" fn (value: *const c_void, - context: *const c_void); -pub type CFSetRetainCallBack = *const u8; -pub type CFSetReleaseCallBack = *const u8; -pub type CFSetCopyDescriptionCallBack = *const u8; -pub type CFSetEqualCallBack = *const u8; -pub type CFSetHashCallBack = *const u8; +pub type CFSetApplierFunction = extern "C" fn (value: *const c_void, context: *const c_void); +pub type CFSetRetainCallBack = extern "C" fn (allocator: CFAllocatorRef, value: *const c_void) -> *const c_void; +pub type CFSetReleaseCallBack = extern "C" fn (allocator: CFAllocatorRef, value: *const c_void); +pub type CFSetCopyDescriptionCallBack = extern "C" fn (value: *const c_void) -> CFStringRef; +pub type CFSetEqualCallBack = extern "C" fn (value1: *const c_void, value2: *const c_void) -> Boolean; +pub type CFSetHashCallBack = extern "C" fn (value: *const c_void) -> CFHashCode; #[repr(C)] #[derive(Clone, Copy)]