Auto merge of #57 - nox:fix-all-the-things, r=Manishearth
Fix all the things <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/core-graphics-rs/57) <!-- Reviewable:end -->
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
// this file defines CGFloat, as well as stubbed data types.
|
||||
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
|
||||
use libc;
|
||||
|
||||
|
||||
+1
-3
@@ -8,12 +8,10 @@
|
||||
// except according to those terms.
|
||||
|
||||
use core_foundation::base::{CFRelease, CFRetain, CFTypeID, CFTypeRef, TCFType};
|
||||
use libc::{c_void, size_t};
|
||||
use std::mem;
|
||||
use std::ptr;
|
||||
|
||||
#[repr(C)]
|
||||
struct __CGColorSpace;
|
||||
pub struct __CGColorSpace;
|
||||
|
||||
pub type CGColorSpaceRef = *const __CGColorSpace;
|
||||
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ use std::ptr;
|
||||
use std::slice;
|
||||
|
||||
#[repr(C)]
|
||||
struct __CGContext;
|
||||
pub struct __CGContext;
|
||||
|
||||
pub type CGContextRef = *const __CGContext;
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ pub type CGDataProviderReleaseDataCallback = *const u8;
|
||||
pub type CGDataProviderGetBytesAtPositionCallback = *const u8;
|
||||
|
||||
#[repr(C)]
|
||||
struct __CGDataProvider;
|
||||
pub struct __CGDataProvider;
|
||||
|
||||
pub type CGDataProviderRef = *const __CGDataProvider;
|
||||
|
||||
|
||||
+4
-4
@@ -7,11 +7,11 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// this file defines CGFloat, as well as stubbed data types.
|
||||
extern crate core_foundation;
|
||||
// extern crate core_foundation_sys;
|
||||
#![allow(non_upper_case_globals)]
|
||||
|
||||
pub use libc;
|
||||
extern crate core_foundation;
|
||||
|
||||
use libc;
|
||||
pub use base::{CGError, boolean_t};
|
||||
pub use geometry::{CGRect, CGPoint, CGSize};
|
||||
|
||||
|
||||
+2
-2
@@ -20,7 +20,7 @@ use std::ptr;
|
||||
pub type CGGlyph = libc::c_ushort;
|
||||
|
||||
#[repr(C)]
|
||||
struct __CGFont;
|
||||
pub struct __CGFont;
|
||||
|
||||
pub type CGFontRef = *const __CGFont;
|
||||
|
||||
@@ -41,7 +41,7 @@ impl Serialize for CGFont {
|
||||
impl Deserialize for CGFont {
|
||||
fn deserialize<D>(deserializer: &mut D) -> Result<Self, D::Error> where D: Deserializer {
|
||||
let postscript_name: String = try!(Deserialize::deserialize(deserializer));
|
||||
CGFont::from_name(&CFString::new(&*postscript_name)).map_err(|err| {
|
||||
CGFont::from_name(&CFString::new(&*postscript_name)).map_err(|_| {
|
||||
de::Error::invalid_value("Couldn't find a font with that PostScript name!")
|
||||
})
|
||||
}
|
||||
|
||||
+1
-1
@@ -91,7 +91,7 @@ mod ffi {
|
||||
use libc::{c_int, c_uint};
|
||||
|
||||
// This is an enum so that we can't easily make instances of this opaque type.
|
||||
enum CGSRegionObject {}
|
||||
pub enum CGSRegionObject {}
|
||||
|
||||
pub type CGError = OSStatus;
|
||||
pub type CGSRegionRef = *mut CGSRegionObject;
|
||||
|
||||
Reference in New Issue
Block a user