diff options
Diffstat (limited to 'vendor/core-foundation-sys')
-rw-r--r-- | vendor/core-foundation-sys/.cargo-checksum.json | 2 | ||||
-rw-r--r-- | vendor/core-foundation-sys/Cargo.toml | 13 | ||||
-rw-r--r-- | vendor/core-foundation-sys/build.rs | 14 | ||||
-rw-r--r-- | vendor/core-foundation-sys/src/array.rs | 36 | ||||
-rw-r--r-- | vendor/core-foundation-sys/src/lib.rs | 10 |
5 files changed, 41 insertions, 34 deletions
diff --git a/vendor/core-foundation-sys/.cargo-checksum.json b/vendor/core-foundation-sys/.cargo-checksum.json index 0bdf99086..c2cd267f0 100644 --- a/vendor/core-foundation-sys/.cargo-checksum.json +++ b/vendor/core-foundation-sys/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"Cargo.toml":"ddcd13ba60bd9368949654be284efac4a55e482b7233e42c9d2fef97ff825eb8","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"62065228e42caebca7e7d7db1204cbb867033de5982ca4009928915e4095f3a3","build.rs":"9433ed3b20cc99e716dda4c6d8507c29bc04882544cbbea8d4e48ba80fd0fa12","src/array.rs":"40c305658e16b07d86353a5ad34e7b5fb98720f19cc2b5173360d6a61ce2642f","src/attributed_string.rs":"48c2d161d6f54136ae895a9f52efad1f831718ea331b875d25498039158a2d51","src/base.rs":"7b21281e9a01903c79a7891ee4e1865a11504b281b468815d1a3838e1744a3c2","src/bundle.rs":"2a3413e649e1cf5eb1557fa5e3e6d442389caa2978a4a0c2c7afdfa4c388c0bf","src/characterset.rs":"a10bbb42ddc74b3dc50b43ae6a50cc9d9a1cd08b975a1ce1b092be4bf64448a6","src/data.rs":"2b121f102b4c2778475f4902016820c4a70e2f8ac532af53913561d42757fa2e","src/date.rs":"c064ee4c3ebd1927532c34871e2e41179d6e3c3e400f6b409a18ad9e2337477f","src/dictionary.rs":"3327a6f90f1e0db5e3fde1973e2df4143ca896716a816d03f2b17c8e988c5159","src/error.rs":"6205ebeb7631daa8bcd560862b6daa10f640c8c117ce5f6f7184f268dcbcb42a","src/filedescriptor.rs":"49580654b657811fade7adaa256f5f895cb011c9baa4731e2f44a6ec7fdba235","src/lib.rs":"e0b6b9d16f6cae1328de772e056e90003b0a5aa5859f5cde58f6aac4683bb543","src/mach_port.rs":"bd413d44772eaeb24e74e1b7b4f234b159b916caa0896c8e82fe54ce1b9deeb6","src/messageport.rs":"e9227d5907cba8e29cdeea41bcb3ae5c7840220442953ab19aace31a84542f47","src/number.rs":"f28040accfbbec99c4e55f411facac7cde4ad89298af2d7d907312f18e4263bf","src/propertylist.rs":"7ec928438826c4ce40befedf3de0a37c8ecbc0fc17896dfa629d5864000b2cfe","src/runloop.rs":"26ca33e2472d191f583e01c24e8cd262f54de8b542fbe7278f33ab08b2925794","src/set.rs":"116c2f18008bfbeecac570d366dbd95b8fe5b9373e3e1bdd2c1d588314d776c5","src/string.rs":"b2856d0bf7a8583370d18d3f041ac5eb00fd6a1aabc69503e7c11a93d42036d8","src/timezone.rs":"c7dd9557646b7ff2bfd6a98bf92142b8304125b4e78dd651b687abc8da191159","src/url.rs":"4358f756ed3d5e9afd5a7f3e2e9115adc6133b47dc7ce59d6ebb32c6610b0e8f","src/uuid.rs":"82f75efa73d0842dff2e13d299c166c6593a77fcb69c4b7629a2df1c17ae507d"},"package":"5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc"}
\ No newline at end of file +{"files":{"Cargo.toml":"3d8f48ae4a8127b0b716ca1d2baf49e37ee2b1c99c9ae6d3014a215d59c2ebb5","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"62065228e42caebca7e7d7db1204cbb867033de5982ca4009928915e4095f3a3","src/array.rs":"1e016cbb3f52c9df45abcc3bce8102cf74c9eeae9d7db16e3bba9ee81b35100d","src/attributed_string.rs":"48c2d161d6f54136ae895a9f52efad1f831718ea331b875d25498039158a2d51","src/base.rs":"7b21281e9a01903c79a7891ee4e1865a11504b281b468815d1a3838e1744a3c2","src/bundle.rs":"2a3413e649e1cf5eb1557fa5e3e6d442389caa2978a4a0c2c7afdfa4c388c0bf","src/characterset.rs":"a10bbb42ddc74b3dc50b43ae6a50cc9d9a1cd08b975a1ce1b092be4bf64448a6","src/data.rs":"2b121f102b4c2778475f4902016820c4a70e2f8ac532af53913561d42757fa2e","src/date.rs":"c064ee4c3ebd1927532c34871e2e41179d6e3c3e400f6b409a18ad9e2337477f","src/dictionary.rs":"3327a6f90f1e0db5e3fde1973e2df4143ca896716a816d03f2b17c8e988c5159","src/error.rs":"6205ebeb7631daa8bcd560862b6daa10f640c8c117ce5f6f7184f268dcbcb42a","src/filedescriptor.rs":"49580654b657811fade7adaa256f5f895cb011c9baa4731e2f44a6ec7fdba235","src/lib.rs":"469b20bf6fc5d86e54183147a2dc80481db2bb73843c7e16305fe259897ac3e2","src/mach_port.rs":"bd413d44772eaeb24e74e1b7b4f234b159b916caa0896c8e82fe54ce1b9deeb6","src/messageport.rs":"e9227d5907cba8e29cdeea41bcb3ae5c7840220442953ab19aace31a84542f47","src/number.rs":"f28040accfbbec99c4e55f411facac7cde4ad89298af2d7d907312f18e4263bf","src/propertylist.rs":"7ec928438826c4ce40befedf3de0a37c8ecbc0fc17896dfa629d5864000b2cfe","src/runloop.rs":"26ca33e2472d191f583e01c24e8cd262f54de8b542fbe7278f33ab08b2925794","src/set.rs":"116c2f18008bfbeecac570d366dbd95b8fe5b9373e3e1bdd2c1d588314d776c5","src/string.rs":"b2856d0bf7a8583370d18d3f041ac5eb00fd6a1aabc69503e7c11a93d42036d8","src/timezone.rs":"c7dd9557646b7ff2bfd6a98bf92142b8304125b4e78dd651b687abc8da191159","src/url.rs":"4358f756ed3d5e9afd5a7f3e2e9115adc6133b47dc7ce59d6ebb32c6610b0e8f","src/uuid.rs":"82f75efa73d0842dff2e13d299c166c6593a77fcb69c4b7629a2df1c17ae507d"},"package":"e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa"}
\ No newline at end of file diff --git a/vendor/core-foundation-sys/Cargo.toml b/vendor/core-foundation-sys/Cargo.toml index bd17103b5..a174e02e2 100644 --- a/vendor/core-foundation-sys/Cargo.toml +++ b/vendor/core-foundation-sys/Cargo.toml @@ -3,22 +3,21 @@ # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies -# to registry (e.g., crates.io) dependencies +# to registry (e.g., crates.io) dependencies. # -# If you believe there's an error in this file please file an -# issue against the rust-lang/cargo repository. If you're -# editing this file be aware that the upstream Cargo.toml -# will likely look very different (and much more reasonable) +# If you are reading this file be aware that the original Cargo.toml +# will likely look very different (and much more reasonable). +# See Cargo.toml.orig for the original contents. [package] name = "core-foundation-sys" -version = "0.8.3" +version = "0.8.4" authors = ["The Servo Project Developers"] -build = "build.rs" description = "Bindings to Core Foundation for macOS" homepage = "https://github.com/servo/core-foundation-rs" license = "MIT / Apache-2.0" repository = "https://github.com/servo/core-foundation-rs" + [package.metadata.docs.rs] default-target = "x86_64-apple-darwin" diff --git a/vendor/core-foundation-sys/build.rs b/vendor/core-foundation-sys/build.rs deleted file mode 100644 index 1f03b0602..000000000 --- a/vendor/core-foundation-sys/build.rs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2013-2015 The Servo Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -fn main() { - if std::env::var("TARGET").unwrap().contains("-apple") { - println!("cargo:rustc-link-lib=framework=CoreFoundation"); - } -} diff --git a/vendor/core-foundation-sys/src/array.rs b/vendor/core-foundation-sys/src/array.rs index 5090302fc..c73896125 100644 --- a/vendor/core-foundation-sys/src/array.rs +++ b/vendor/core-foundation-sys/src/array.rs @@ -9,13 +9,15 @@ use std::os::raw::c_void; -use base::{CFRange, CFIndex, CFAllocatorRef, CFTypeID, Boolean}; +use base::{CFRange, CFIndex, CFAllocatorRef, CFTypeID, Boolean, CFComparisonResult}; use string::CFStringRef; pub type CFArrayRetainCallBack = extern "C" fn(allocator: CFAllocatorRef, value: *const c_void) -> *const c_void; pub type CFArrayReleaseCallBack = extern "C" fn(allocator: CFAllocatorRef, value: *const c_void); pub type CFArrayCopyDescriptionCallBack = extern "C" fn(value: *const c_void) -> CFStringRef; pub type CFArrayEqualCallBack = extern "C" fn(value1: *const c_void, value2: *const c_void) -> Boolean; +pub type CFArrayApplierFunction = extern "C" fn(value: *const c_void, context: *mut c_void); +pub type CFComparatorFunction = extern "C" fn(val1: *const c_void, val2: *const c_void) -> CFComparisonResult; #[repr(C)] #[derive(Clone, Copy)] @@ -31,6 +33,7 @@ pub struct CFArrayCallBacks { pub struct __CFArray(c_void); pub type CFArrayRef = *const __CFArray; +pub type CFMutableArrayRef = *mut __CFArray; extern { /* @@ -38,18 +41,27 @@ extern { */ pub static kCFTypeArrayCallBacks: CFArrayCallBacks; - pub fn CFArrayCreate(allocator: CFAllocatorRef, values: *const *const c_void, - numValues: CFIndex, callBacks: *const CFArrayCallBacks) -> CFArrayRef; + pub fn CFArrayGetTypeID() -> CFTypeID; + pub fn CFArrayCreate(allocator: CFAllocatorRef, values: *const *const c_void, numValues: CFIndex, callBacks: *const CFArrayCallBacks) -> CFArrayRef; pub fn CFArrayCreateCopy(allocator: CFAllocatorRef , theArray: CFArrayRef) -> CFArrayRef; - - // CFArrayBSearchValues - // CFArrayContainsValue + pub fn CFArrayCreateMutable(allocator: CFAllocatorRef, capacity: CFIndex, callBacks: *const CFArrayCallBacks) -> CFMutableArrayRef; + pub fn CFArrayCreateMutableCopy(allocator: CFAllocatorRef, capacity: CFIndex, theArray: CFArrayRef)-> CFMutableArrayRef; pub fn CFArrayGetCount(theArray: CFArrayRef) -> CFIndex; - // CFArrayGetCountOfValue - // CFArrayGetFirstIndexOfValue - // CFArrayGetLastIndexOfValue - pub fn CFArrayGetValues(theArray: CFArrayRef, range: CFRange, values: *mut *const c_void); + pub fn CFArrayGetCountOfValue(theArray: CFArrayRef, range: CFRange, value: *const c_void) -> CFIndex; + pub fn CFArrayContainsValue(theArray: CFArrayRef, range: CFRange, value: *const c_void) -> Boolean; pub fn CFArrayGetValueAtIndex(theArray: CFArrayRef, idx: CFIndex) -> *const c_void; - // CFArrayApplyFunction - pub fn CFArrayGetTypeID() -> CFTypeID; + pub fn CFArrayGetValues(theArray: CFArrayRef, range: CFRange, values: *mut *const c_void); + pub fn CFArrayApplyFunction(theArray: CFArrayRef, range: CFRange, applier: CFArrayApplierFunction, context: *mut c_void); + pub fn CFArrayGetFirstIndexOfValue(theArray: CFArrayRef, range: CFRange, value: *const c_void) -> CFIndex; + pub fn CFArrayGetLastIndexOfValue(theArray: CFArrayRef, range: CFRange, value: *const c_void) -> CFIndex; + pub fn CFArrayBSearchValues(theArray: CFArrayRef, range: CFRange, value: *const c_void, comparator: CFComparatorFunction, context: *mut c_void) -> CFIndex; + pub fn CFArrayAppendValue(theArray: CFMutableArrayRef, value: *const c_void); + pub fn CFArrayInsertValueAtIndex(theArray: CFMutableArrayRef, idx: CFIndex, value: *const c_void); + pub fn CFArraySetValueAtIndex(theArray: CFMutableArrayRef, idx: CFIndex, value: *const c_void); + pub fn CFArrayRemoveValueAtIndex(theArray: CFMutableArrayRef, idx: CFIndex); + pub fn CFArrayRemoveAllValues(theArray: CFMutableArrayRef); + pub fn CFArrayReplaceValues(theArray: CFMutableArrayRef, range: CFRange, newValues: *mut *const c_void, newCount: CFIndex); + pub fn CFArrayExchangeValuesAtIndices(theArray: CFMutableArrayRef, idx1: CFIndex, idx2: CFIndex); + pub fn CFArraySortValues(theArray: CFMutableArrayRef, range: CFRange, comparator: CFComparatorFunction, context: *mut c_void); + pub fn CFArrayAppendArray(theArray: CFMutableArrayRef, otherArray: CFArrayRef, otherRange: CFRange ); } diff --git a/vendor/core-foundation-sys/src/lib.rs b/vendor/core-foundation-sys/src/lib.rs index f9a188416..48c08878b 100644 --- a/vendor/core-foundation-sys/src/lib.rs +++ b/vendor/core-foundation-sys/src/lib.rs @@ -10,6 +10,16 @@ #![cfg_attr(all(feature="mac_os_10_7_support", feature="mac_os_10_8_features"), feature(linkage))] // back-compat requires weak linkage +// Link to CoreFoundation on any Apple device. +// +// We don't use `target_vendor` since that is going to be deprecated: +// https://github.com/rust-lang/lang-team/issues/102 +#[cfg_attr( + any(target_os = "macos", target_os = "ios", target_os = "tvos"), + link(name = "CoreFoundation", kind = "framework") +)] +extern "C" {} + pub mod array; pub mod attributed_string; pub mod base; |