Repository: servo/core-foundation-rs (language: rust)

Issue:
core-foundation 0.7.1 breaks semver
b68e9c782 breaks existing code that is passing by value.

A reasonable fix would be to use `AsRef<T>` in the signatures, which lets code that passes by value continue to compile; or leave it as is and go to 0.8.0?

https://github.com/linebender/piet/pull/220


Discussion / hints:
Shoot, I'm not sure how I overlooked that. Thanks!

Fix patch:
diff --git a/cocoa/Cargo.toml b/cocoa/Cargo.toml
index 6d55fc4ac..698c9c53d 100644
--- a/cocoa/Cargo.toml
+++ b/cocoa/Cargo.toml
@@ -15,7 +15,7 @@ default-target = "x86_64-apple-darwin"
 block = "0.1"
 bitflags = "1.0"
 libc = "0.2"
-core-foundation = { path = "../core-foundation", version = "0.7" }
-core-graphics = { path = "../core-graphics", version = "0.19" }
+core-foundation = { path = "../core-foundation", version = "0.8" }
+core-graphics = { path = "../core-graphics", version = "0.20" }
 foreign-types = "0.3"
 objc = "0.2.3"
diff --git a/core-foundation/Cargo.toml b/core-foundation/Cargo.toml
index 75f863afd..b4ef3c647 100644
--- a/core-foundation/Cargo.toml
+++ b/core-foundation/Cargo.toml
@@ -3,7 +3,7 @@ name = "core-foundation"
 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.7.1"
+version = "0.8.0"
 authors = ["The Servo Project Developers"]
 license = "MIT / Apache-2.0"
 categories = ["os::macos-apis"]
diff --git a/core-graphics/Cargo.toml b/core-graphics/Cargo.toml
index c0d83f79b..6523518bd 100644
--- a/core-graphics/Cargo.toml
+++ b/core-graphics/Cargo.toml
@@ -3,7 +3,7 @@ name = "core-graphics"
 description = "Bindings to Core Graphics for macOS"
 homepage = "https://github.com/servo/core-graphics-rs"
 repository = "https://github.com/servo/core-foundation-rs"
-version = "0.19.2"
+version = "0.20.0"
 authors = ["The Servo Project Developers"]
 license = "MIT / Apache-2.0"
 
@@ -14,6 +14,6 @@ highsierra = []
 
 [dependencies]
 bitflags = "1.0"
-core-foundation = { path = "../core-foundation", version = "0.7" }
+core-foundation = { path = "../core-foundation", version = "0.8" }
 foreign-types = "0.3.0"
 libc = "0.2"
diff --git a/core-text/Cargo.toml b/core-text/Cargo.toml
index 857b188ef..3524e97cc 100644
--- a/core-text/Cargo.toml
+++ b/core-text/Cargo.toml
@@ -18,5 +18,5 @@ mountainlion = []
 [dependencies]
 foreign-types = "0.3"
 libc = "0.2"
-core-foundation = { path = "../core-foundation", version = "0.7" }
-core-graphics = { path = "../core-graphics", version = "0.19.1" }
+core-foundation = { path = "../core-foundation", version = "0.8" }
+core-graphics = { path = "../core-graphics", version = "0.20.0" }
diff --git a/io-surface/Cargo.toml b/io-surface/Cargo.toml
index 88f897c42..2534c6b19 100644
--- a/io-surface/Cargo.toml
+++ b/io-surface/Cargo.toml
@@ -13,6 +13,6 @@ default-target = "x86_64-apple-darwin"
 [dependencies]
 libc = "0.2"
 gleam = "0.7"
-core-foundation = { path = "../core-foundation", version = "0.7" }
+core-foundation = { path = "../core-foundation", version = "0.8" }
 cgl = "0.3"
 leaky-cow = "0.1.1"
diff --git a/io-surface/src/lib.rs b/io-surface/src/lib.rs
index cc49c7a64..adc52771b 100644
--- a/io-surface/src/lib.rs
+++ b/io-surface/src/lib.rs
@@ -132,7 +132,7 @@ impl IOSurface {
                                                   height,
                                                   BGRA as GLenum,
                                                   UNSIGNED_INT_8_8_8_8_REV,
-                                                  self.as_concrete_TypeRef() as *mut c_void,
+                                                  self.as_concrete_TypeRef() as *mut libc::c_void,
                                                   0);
 
             if gl_error != kCGLNoError {


Test patch: