diff --git a/core-foundation-sys/Cargo.toml b/core-foundation-sys/Cargo.toml index 16e1ff2..9fb311d 100644 --- a/core-foundation-sys/Cargo.toml +++ b/core-foundation-sys/Cargo.toml @@ -3,7 +3,7 @@ name = "core-foundation-sys" description = "Bindings to Core Foundation for macOS" homepage = "https://github.com/servo/core-foundation-rs" repository = "https://github.com/servo/core-foundation-rs" -version = "0.6.3" +version = "0.7.0" authors = ["The Servo Project Developers"] license = "MIT / Apache-2.0" build = "build.rs" diff --git a/core-foundation-sys/src/runloop.rs b/core-foundation-sys/src/runloop.rs index cfaf9db..53035a2 100644 --- a/core-foundation-sys/src/runloop.rs +++ b/core-foundation-sys/src/runloop.rs @@ -50,13 +50,13 @@ pub const kCFRunLoopAllActivities: CFOptionFlags = 0x0FFFFFFF; pub struct CFRunLoopSourceContext { pub version: CFIndex, pub info: *mut c_void, - pub retain: extern "C" fn (info: *const c_void) -> *const c_void, - pub release: extern "C" fn (info: *const c_void), - pub copyDescription: extern "C" fn (info: *const c_void) -> CFStringRef, - pub equal: extern "C" fn (info1: *const c_void, info2: *const c_void) -> Boolean, - pub hash: extern "C" fn (info: *const c_void) -> CFHashCode, - pub schedule: extern "C" fn (info: *const c_void, rl: CFRunLoopRef, mode: CFStringRef), - pub cancel: extern "C" fn (info: *const c_void, rl: CFRunLoopRef, mode: CFStringRef), + pub retain: Option *const c_void>, + pub release: Option, + pub copyDescription: Option CFStringRef>, + pub equal: Option Boolean>, + pub hash: Option CFHashCode>, + pub schedule: Option, + pub cancel: Option, pub perform: extern "C" fn (info: *const c_void), } @@ -64,11 +64,11 @@ pub struct CFRunLoopSourceContext { pub struct CFRunLoopSourceContext1 { pub version: CFIndex, pub info: *mut c_void, - pub retain: extern "C" fn (info: *const c_void) -> *const c_void, - pub release: extern "C" fn (info: *const c_void), - pub copyDescription: extern "C" fn (info: *const c_void) -> CFStringRef, - pub equal: extern "C" fn (info1: *const c_void, info2: *const c_void) -> Boolean, - pub hash: extern "C" fn (info: *const c_void) -> CFHashCode, + pub retain: Option *const c_void>, + pub release: Option, + pub copyDescription: Option CFStringRef>, + pub equal: Option Boolean>, + pub hash: Option CFHashCode>, // note that the following two fields are platform dependent in the C header, the ones here are for macOS pub getPort: extern "C" fn (info: *mut c_void) -> mach_port_t, pub perform: extern "C" fn (msg: *mut c_void, size: CFIndex, allocator: CFAllocatorRef, info: *mut c_void) -> *mut c_void, @@ -78,9 +78,9 @@ pub struct CFRunLoopSourceContext1 { pub struct CFRunLoopObserverContext { pub version: CFIndex, pub info: *mut c_void, - pub retain: extern "C" fn (info: *const c_void) -> *const c_void, - pub release: extern "C" fn (info: *const c_void), - pub copyDescription: extern "C" fn (info: *const c_void) -> CFStringRef, + pub retain: Option *const c_void>, + pub release: Option, + pub copyDescription: Option CFStringRef>, } pub type CFRunLoopObserverCallBack = extern "C" fn (observer: CFRunLoopObserverRef, activity: CFRunLoopActivity, info: *mut c_void); @@ -89,15 +89,15 @@ pub type CFRunLoopObserverCallBack = extern "C" fn (observer: CFRunLoopObserverR pub struct CFRunLoopTimerContext { pub version: CFIndex, pub info: *mut c_void, - pub retain: extern "C" fn (info: *const c_void) -> *const c_void, - pub release: extern "C" fn (info: *const c_void), - pub copyDescription: extern "C" fn (info: *const c_void) -> CFStringRef, + pub retain: Option *const c_void>, + pub release: Option, + pub copyDescription: Option CFStringRef>, } pub type CFRunLoopTimerCallBack = extern "C" fn (timer: CFRunLoopTimerRef, info: *mut c_void); #[repr(C)] -pub struct __CFRunLoopTimer; +pub struct __CFRunLoopTimer(c_void); pub type CFRunLoopTimerRef = *mut __CFRunLoopTimer; diff --git a/core-foundation/Cargo.toml b/core-foundation/Cargo.toml index b36beb6..38d4abf 100644 --- a/core-foundation/Cargo.toml +++ b/core-foundation/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["macos", "framework", "objc"] [dependencies.core-foundation-sys] path = "../core-foundation-sys" -version = "0.6.1" +version = "0.7.0" [dependencies] libc = "0.2"