diff --git a/src/array.rs b/src/array.rs index 831f8c7..2fdee58 100644 --- a/src/array.rs +++ b/src/array.rs @@ -29,6 +29,7 @@ pub type CFArrayEqualCallBack = *const u8; #[allow(dead_code)] #[repr(C)] +#[deriving(Copy)] pub struct CFArrayCallBacks { version: CFIndex, retain: CFArrayRetainCallBack, diff --git a/src/base.rs b/src/base.rs index ecd1e79..bcd2df1 100644 --- a/src/base.rs +++ b/src/base.rs @@ -8,7 +8,7 @@ // except according to those terms. use libc::{c_long, c_ulong}; -use std::num::Bounded; +use std::num::Int; pub type Boolean = u8; @@ -23,7 +23,7 @@ pub trait CFIndexConvertible { impl CFIndexConvertible for uint { #[inline] fn to_CFIndex(self) -> CFIndex { - let max_CFIndex: CFIndex = Bounded::max_value(); + let max_CFIndex: CFIndex = Int::max_value(); if self > (max_CFIndex as uint) { panic!("value out of range") } @@ -35,6 +35,7 @@ pub type CFOptionFlags = u32; #[allow(dead_code)] #[repr(C)] +#[deriving(Copy)] pub struct CFRange { location: CFIndex, length: CFIndex diff --git a/src/dictionary.rs b/src/dictionary.rs index 5b17bdf..2d8200b 100644 --- a/src/dictionary.rs +++ b/src/dictionary.rs @@ -26,6 +26,7 @@ pub type CFDictionaryRetainCallBack = *const u8; #[allow(dead_code)] #[repr(C)] +#[deriving(Copy)] pub struct CFDictionaryKeyCallBacks { version: CFIndex, retain: CFDictionaryRetainCallBack, @@ -37,6 +38,7 @@ pub struct CFDictionaryKeyCallBacks { #[allow(dead_code)] #[repr(C)] +#[deriving(Copy)] pub struct CFDictionaryValueCallBacks { version: CFIndex, retain: CFDictionaryRetainCallBack, diff --git a/src/set.rs b/src/set.rs index d053277..4c32881 100644 --- a/src/set.rs +++ b/src/set.rs @@ -23,6 +23,7 @@ pub type CFSetHashCallBack = *const u8; #[allow(dead_code)] #[repr(C)] +#[deriving(Copy)] pub struct CFSetCallBacks { version: CFIndex, retain: CFSetRetainCallBack, @@ -108,7 +109,7 @@ extern { static kCFTypeSetCallBacks: CFSetCallBacks; /* Creating Sets */ - fn CFSetCreate(allocator: CFAllocatorRef, values: *const *const c_void, numValues: CFIndex, + fn CFSetCreate(allocator: CFAllocatorRef, values: *const *const c_void, numValues: CFIndex, callBacks: *const CFSetCallBacks) -> CFSetRef; /* Applying a Function to Set Members */