From 182aef27d6ad00deb21867048470d4ce4bd42ce7 Mon Sep 17 00:00:00 2001 From: "J.C. Jones" Date: Fri, 31 Mar 2017 14:08:48 -0700 Subject: [PATCH] Add CFSetApplyFunction and CFSetGetCount --- core-foundation-sys/src/set.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core-foundation-sys/src/set.rs b/core-foundation-sys/src/set.rs index 0e7e64c..ca9c3c5 100644 --- a/core-foundation-sys/src/set.rs +++ b/core-foundation-sys/src/set.rs @@ -11,6 +11,8 @@ use libc::c_void; use base::{CFAllocatorRef, CFIndex, CFTypeID}; +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; @@ -45,7 +47,11 @@ extern { callBacks: *const CFSetCallBacks) -> CFSetRef; /* Applying a Function to Set Members */ - //fn CFSetApplyFunction + pub fn CFSetApplyFunction(theSet: CFSetRef, + applier: CFSetApplierFunction, + context: *const c_void); + + pub fn CFSetGetCount(theSet: CFSetRef) -> CFIndex; pub fn CFSetGetTypeID() -> CFTypeID; }