]> gitweb.factorcode.org Git - factor.git/blob - basis/core-foundation/data/data.factor
ef5973888edf872cc898ba16c80ccc15bfa756b4
[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 kernel math sequences ;
4 IN: core-foundation.data
5
6 TYPEDEF: void* CFDataRef
7 TYPEDEF: void* CFSetRef
8
9 TYPEDEF: int CFPropertyListMutabilityOptions
10 CONSTANT: kCFPropertyListImmutable 0
11 CONSTANT: kCFPropertyListMutableContainers 1
12 CONSTANT: kCFPropertyListMutableContainersAndLeaves 2
13
14 FUNCTION: CFDataRef CFDataCreate ( CFAllocatorRef allocator, uchar* bytes, CFIndex length ) ;
15
16 FUNCTION: CFTypeID CFGetTypeID ( CFTypeRef cf ) ;
17
18 : <CFData> ( byte-array -- alien )
19     [ f ] dip dup length CFDataCreate ;