Skip to content

Commit c9b0702

Browse files
author
bors-servo
authored
Auto merge of #337 - wezm:CFDataGetBytes, r=jdm
Add CFDataGetBytes to CFData bindings Just add a missing binding that I needed. <!-- 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-foundation-rs/337) <!-- Reviewable:end -->
2 parents 6143ce1 + b2a4a0e commit c9b0702

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core-foundation-sys/src/data.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
use std::os::raw::c_void;
1111

12-
use base::{CFAllocatorRef, CFTypeID, CFIndex};
12+
use base::{CFAllocatorRef, CFTypeID, CFIndex, CFRange};
1313

1414
#[repr(C)]
1515
pub struct __CFData(c_void);
@@ -25,6 +25,7 @@ extern {
2525
bytes: *const u8, length: CFIndex) -> CFDataRef;
2626
//fn CFDataFind
2727
pub fn CFDataGetBytePtr(theData: CFDataRef) -> *const u8;
28+
pub fn CFDataGetBytes(theData: CFDataRef, range: CFRange, buffer: *mut u8);
2829
pub fn CFDataGetLength(theData: CFDataRef) -> CFIndex;
2930

3031
pub fn CFDataGetTypeID() -> CFTypeID;

0 commit comments

Comments
 (0)