@@ -53,10 +53,20 @@ OF_BLOCK_FIELD_IS_BLOCK = 7, OF_BLOCK_FIELD_IS_BYREF = 8, OF_BLOCK_FIELD_IS_WEAK = 16, OF_BLOCK_BYREF_CALLER = 128, }; + +extern void* _Block_copy(const void*); +extern void _Block_release(const void*); + +#ifndef Block_copy +# define Block_copy(x) ((__typeof__(x))_Block_copy((const void*)(x))) +#endif +#ifndef Block_release +# define Block_release(x) _Block_release((const void*)(x)) +#endif @interface OFBlock { Class isa; } @@ -64,14 +74,13 @@ - copy; - (void)release; - autorelease; @end -extern void* _Block_copy(const void*); -extern void _Block_release(const void*); - -#ifndef Block_copy -# define Block_copy(x) ((__typeof__(x))_Block_copy((const void*)(x))) -#endif -#ifndef Block_release -# define Block_release(x) _Block_release((const void*)(x)) -#endif +@interface OFStackBlock: OFBlock +@end + +@interface OFGlobalBlock: OFBlock +@end + +@interface OFMallocBlock: OFBlock +@end