From 2fe22f8c98b68fd1578f65ed8f82b860db295d78 Mon Sep 17 00:00:00 2001 From: Makoto Kato Date: Tue, 26 Jan 2021 13:59:23 +0900 Subject: [PATCH] Add CFStringCreateWithCharactersNoCopy --- core-foundation-sys/src/string.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core-foundation-sys/src/string.rs b/core-foundation-sys/src/string.rs index 8b92024..d4f6550 100644 --- a/core-foundation-sys/src/string.rs +++ b/core-foundation-sys/src/string.rs @@ -219,7 +219,11 @@ extern { contentsDeallocator: CFAllocatorRef) -> CFStringRef; //fn CFStringCreateWithCharacters - //fn CFStringCreateWithCharactersNoCopy + pub fn CFStringCreateWithCharactersNoCopy(alloc: CFAllocatorRef, + chars: *const UniChar, + numChars: CFIndex, + contentsDeallocator: CFAllocatorRef) + -> CFStringRef; pub fn CFStringCreateWithCString(alloc: CFAllocatorRef, cStr: *const c_char, encoding: CFStringEncoding)