From b2a4a0e5661c32582ad07a606647046d18ba0a3e Mon Sep 17 00:00:00 2001 From: Wesley Moore Date: Fri, 11 Oct 2019 15:58:33 +1100 Subject: [PATCH] Add CFDataGetBytes to CFData bindings --- core-foundation-sys/src/data.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core-foundation-sys/src/data.rs b/core-foundation-sys/src/data.rs index 51b3a4cd8..7a62c9b82 100644 --- a/core-foundation-sys/src/data.rs +++ b/core-foundation-sys/src/data.rs @@ -9,7 +9,7 @@ use std::os::raw::c_void; -use base::{CFAllocatorRef, CFTypeID, CFIndex}; +use base::{CFAllocatorRef, CFTypeID, CFIndex, CFRange}; #[repr(C)] pub struct __CFData(c_void); @@ -25,6 +25,7 @@ extern { bytes: *const u8, length: CFIndex) -> CFDataRef; //fn CFDataFind pub fn CFDataGetBytePtr(theData: CFDataRef) -> *const u8; + pub fn CFDataGetBytes(theData: CFDataRef, range: CFRange, buffer: *mut u8); pub fn CFDataGetLength(theData: CFDataRef) -> CFIndex; pub fn CFDataGetTypeID() -> CFTypeID;