remove local workaround for core-foundation UB issue

My fixes landed upstream in https://github.com/servo/core-foundation-rs/commit/0a3ac83c1bb38d30a4d30530cd233385b7410b2c
and are released already to crates.io
This commit is contained in:
Wez Furlong committed 2019-11-13 00:05:55 -08:00
1 parent 3ec3caf8f4
commit 58d4a0a020
3 files changed
+6 -45

No files matched your search

+3 -3
View File
@@ -83,9 +83,9 @@ openssl = "0.10"
[target.'cfg(target_os = "macos")'.dependencies]
openssl = { version = "0.10", features = ["vendored"] }
core-foundation = "0.6"
core-graphics = "0.17"
core-text = "13.3"
core-foundation = "0.7"
core-graphics = "0.19"
core-text = "15.0"
[workspace]
+3 -3
View File
@@ -50,8 +50,8 @@ mio-extras = "2.0"
libc = "0.2"
[target.'cfg(target_os="macos")'.dependencies]
cocoa = "0.19"
cocoa = "0.20"
objc = "0.2"
core-foundation = "0.6"
core-graphics = "0.17"
core-foundation = "0.7"
core-graphics = "0.19"
cgl = { version = "0.3", optional = true }
-39
View File
@@ -69,45 +69,6 @@ impl Connection {
}
}
/* Begin: workaround UB in CFRunLoopTimerContext struct.
* This can be removed once an equivalent change is upstreamed to the
* core_foundation crate */
use core_foundation::string::__CFString;
use std::ffi::c_void;
#[repr(transparent)]
pub struct __CFRunLoopTimer(c_void);
#[repr(C)]
#[allow(non_snake_case)]
pub struct CFRunLoopTimerContext {
pub version: i64,
pub info: *mut c_void,
pub retain: Option<extern "C" fn(*const c_void) -> *const c_void>,
pub release: Option<extern "C" fn(*const c_void)>,
pub copyDescription: Option<extern "C" fn(*const c_void) -> *const __CFString>,
}
extern "C" {
fn CFRunLoopTimerCreate(
allocator: *const c_void,
fireDate: f64,
interval: f64,
flags: u32,
order: i64,
callout: extern "C" fn(*mut __CFRunLoopTimer, *mut c_void),
context: *mut CFRunLoopTimerContext,
) -> *mut __CFRunLoopTimer;
fn CFRunLoopAddTimer(
rl: *mut __CFRunLoop,
timer: *mut __CFRunLoopTimer,
mode: *const __CFString,
);
}
/* End: UB workaround */
impl ConnectionOps for Connection {
fn terminate_message_loop(&self) {
unsafe {