1 ! Copyright (C) 2006, 2008 Slava Pestov
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: alien.syntax destructors accessors kernel ;
6 TYPEDEF: void* CFTypeRef
8 TYPEDEF: void* CFAllocatorRef
9 : kCFAllocatorDefault f ; inline
15 TYPEDEF: ulong CFTypeID
16 TYPEDEF: UInt32 CFOptionFlags
17 TYPEDEF: void* CFUUIDRef
19 FUNCTION: CFTypeRef CFRetain ( CFTypeRef cf ) ;
21 FUNCTION: void CFRelease ( CFTypeRef cf ) ;
23 TUPLE: CFRelease-destructor alien disposed ;
25 M: CFRelease-destructor dispose* alien>> CFRelease ;
27 : &CFRelease ( alien -- alien )
28 dup f CFRelease-destructor boa &dispose drop ; inline
30 : |CFRelease ( alien -- alien )
31 dup f CFRelease-destructor boa |dispose drop ; inline