]> gitweb.factorcode.org Git - factor.git/blob - basis/core-foundation/data/data.factor
change back other char/uchar* parameters that don't look like actual string types
[factor.git] / basis / core-foundation / data / data.factor
1 ! Copyright (C) 2008 Joe Groff.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: alien.c-types alien.syntax core-foundation kernel math
4 sequences ;
5 IN: core-foundation.data
6
7 TYPEDEF: void* CFDataRef
8 TYPEDEF: void* CFSetRef
9
10 TYPEDEF: int CFPropertyListMutabilityOptions
11 CONSTANT: kCFPropertyListImmutable 0
12 CONSTANT: kCFPropertyListMutableContainers 1
13 CONSTANT: kCFPropertyListMutableContainersAndLeaves 2
14
15 FUNCTION: CFDataRef CFDataCreate ( CFAllocatorRef allocator, UInt8* bytes, CFIndex length ) ;
16
17 FUNCTION: CFTypeID CFGetTypeID ( CFTypeRef cf ) ;
18
19 : <CFData> ( byte-array -- alien )
20     [ f ] dip dup length CFDataCreate ;