Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split a -sys crate out #68

Merged
merged 19 commits into from Oct 15, 2015

Port boolean to sys crate

  • Loading branch information
sfackler committed Sep 6, 2015
commit 6ffe3ea04f05fb5179d2a6b31929207badf277e4
@@ -4,3 +4,4 @@ extern crate libc;

pub mod array;
pub mod base;
pub mod number;
@@ -0,0 +1,12 @@
use libc::c_void;

use base::CFTypeID;

pub type CFBooleanRef = *const c_void;

extern {
pub static kCFBooleanTrue: CFBooleanRef;
pub static kCFBooleanFalse: CFBooleanRef;

pub fn CFBooleanGetTypeID() -> CFTypeID;
}
@@ -9,18 +9,12 @@

//! A Boolean type.

use core_foundation_sys::base::{CFRelease, CFTypeID};
use core_foundation_sys::base::{CFRelease};
use core_foundation_sys::number::{CFBooleanRef, CFBooleanGetTypeID, kCFBooleanTrue, kCFBooleanFalse};
use std::mem;

use base::TCFType;

pub type Boolean = u32;

#[repr(C)]
struct __CFBoolean;

pub type CFBooleanRef = *const __CFBoolean;

/// A Boolean type.
///
/// FIXME(pcwalton): Should be a newtype struct, but that fails due to a Rust compiler bug.
@@ -49,12 +43,3 @@ impl CFBoolean {
}
}
}

#[link(name = "CoreFoundation", kind = "framework")]
extern {
static kCFBooleanTrue: CFBooleanRef;
static kCFBooleanFalse: CFBooleanRef;

fn CFBooleanGetTypeID() -> CFTypeID;
}

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.