factor/basis/core-foundation/data/data.factor

19 lines
625 B
Factor
Raw Normal View History

! Copyright (C) 2008 Joe Groff.
! See http://factorcode.org/license.txt for BSD license.
2009-05-16 11:45:17 -04:00
USING: alien.c-types alien.syntax kernel math sequences ;
IN: core-foundation.data
TYPEDEF: void* CFDataRef
TYPEDEF: void* CFSetRef
TYPEDEF: int CFPropertyListMutabilityOptions
2009-01-16 19:41:21 -05:00
CONSTANT: kCFPropertyListImmutable 0
CONSTANT: kCFPropertyListMutableContainers 1
CONSTANT: kCFPropertyListMutableContainersAndLeaves 2
FUNCTION: CFDataRef CFDataCreate ( CFAllocatorRef allocator, uchar* bytes, CFIndex length ) ;
FUNCTION: CFTypeID CFGetTypeID ( CFTypeRef cf ) ;
: <CFData> ( byte-array -- alien )
[ f ] dip dup length CFDataCreate ;