Skip to content

Commit 7383217

Browse files
committed
Remove objc2 dependency from core-foundation-sys and core-graphics
1 parent 0eda34d commit 7383217

File tree

10 files changed

+93
-97
lines changed

10 files changed

+93
-97
lines changed

cocoa/src/quartzcore.rs

Lines changed: 93 additions & 60 deletions
Large diffs are not rendered by default.

core-foundation-sys/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ version = "0.8.6"
77
authors = ["The Servo Project Developers"]
88
license = "MIT OR Apache-2.0"
99

10-
[dependencies]
11-
objc2 = "0.4.0"
12-
1310
[features]
1411
mac_os_10_7_support = [] # backwards compatibility
1512
mac_os_10_8_features = [] # enables new features

core-foundation-sys/src/array.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ pub struct __CFArray(c_void);
3636
pub type CFArrayRef = *const __CFArray;
3737
pub type CFMutableArrayRef = *mut __CFArray;
3838

39-
unsafe impl ::objc2::encode::RefEncode for __CFArray {
40-
const ENCODING_REF: ::objc2::encode::Encoding = ::objc2::encode::Encoding::Object;
41-
}
42-
4339
extern "C" {
4440
/*
4541
* CFArray.h

core-foundation-sys/src/attributed_string.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ pub struct __CFAttributedString(c_void);
1919
pub type CFAttributedStringRef = *const __CFAttributedString;
2020
pub type CFMutableAttributedStringRef = *mut __CFAttributedString;
2121

22-
unsafe impl ::objc2::encode::RefEncode for __CFAttributedString {
23-
const ENCODING_REF: ::objc2::encode::Encoding = ::objc2::encode::Encoding::Object;
24-
}
25-
2622
extern "C" {
2723
/*
2824
* CFAttributedString.h

core-foundation-sys/src/dictionary.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,6 @@ pub struct __CFDictionary(c_void);
5151
pub type CFDictionaryRef = *const __CFDictionary;
5252
pub type CFMutableDictionaryRef = *mut __CFDictionary;
5353

54-
unsafe impl ::objc2::encode::RefEncode for __CFDictionary {
55-
const ENCODING_REF: ::objc2::encode::Encoding = ::objc2::encode::Encoding::Object;
56-
}
57-
5854
extern "C" {
5955
/*
6056
* CFDictionary.h

core-foundation-sys/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
feature(linkage)
1818
)] // back-compat requires weak linkage
1919

20-
extern crate objc2;
21-
2220
// Link to CoreFoundation on any Apple device.
2321
//
2422
// We don't use `target_vendor` since that is going to be deprecated:

core-foundation-sys/src/string.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,6 @@ pub fn CFStringInitInlineBuffer(str: CFStringRef, buf: *mut CFStringInlineBuffer
206206
pub fn CFStringGetCharacterFromInlineBuffer(buf: *mut CFStringInlineBuffer, idx: CFIndex) -> UniChar;
207207
*/
208208

209-
unsafe impl ::objc2::encode::RefEncode for __CFString {
210-
const ENCODING_REF: ::objc2::encode::Encoding = ::objc2::encode::Encoding::Object;
211-
}
212-
213209
extern "C" {
214210
/*
215211
* CFString.h

core-graphics/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ core-foundation = { path = "../core-foundation", version = "0.9" }
1818
core-graphics-types = { path = "../core-graphics-types", version = "0.1" }
1919
foreign-types = "0.5.0"
2020
libc = "0.2"
21-
objc2 = "0.4.0"
2221

2322
[package.metadata.docs.rs]
2423
default-target = "x86_64-apple-darwin"

core-graphics/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// except according to those terms.
99

1010
extern crate libc;
11-
extern crate objc2;
1211

1312
#[macro_use]
1413
extern crate core_foundation;

core-graphics/src/sys.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
11
use std::os::raw::c_void;
22

3-
use objc2::encode::{Encoding, RefEncode};
4-
53
pub enum CGImage {}
64
pub type CGImageRef = *mut CGImage;
75

86
#[repr(C)]
97
pub struct __CGColor(c_void);
108

11-
unsafe impl RefEncode for __CGColor {
12-
const ENCODING_REF: Encoding = Encoding::Unknown;
13-
}
14-
159
pub type CGColorRef = *const __CGColor;
1610

1711
pub enum CGColorSpace {}
@@ -20,10 +14,6 @@ pub type CGColorSpaceRef = *mut CGColorSpace;
2014
pub enum CGPath {}
2115
pub type CGPathRef = *mut CGPath;
2216

23-
unsafe impl RefEncode for CGPath {
24-
const ENCODING_REF: Encoding = Encoding::Unknown;
25-
}
26-
2717
pub enum CGDataProvider {}
2818
pub type CGDataProviderRef = *mut CGDataProvider;
2919

@@ -33,10 +23,6 @@ pub type CGFontRef = *mut CGFont;
3323
pub enum CGContext {}
3424
pub type CGContextRef = *mut CGContext;
3525

36-
unsafe impl RefEncode for CGContext {
37-
const ENCODING_REF: Encoding = Encoding::Unknown;
38-
}
39-
4026
pub enum CGGradient {}
4127
pub type CGGradientRef = *mut CGGradient;
4228

0 commit comments

Comments
 (0)