1 #if __has_feature(objc_arr) 2 #define NS_AUTOMATED_REFCOUNT_UNAVAILABLE __attribute__((unavailable("not available in automatic reference counting mode"))) 3 #else 4 #define NS_AUTOMATED_REFCOUNT_UNAVAILABLE 5 #endif 6 7 #define NS_RETURNS_RETAINED __attribute__((ns_returns_retained)) 8 #define CF_CONSUMED __attribute__((cf_consumed)) 9 10 #define NS_INLINE static __inline__ __attribute__((always_inline)) 11 #define nil ((void*) 0) 12 13 typedef int BOOL; 14 typedef unsigned NSUInteger; 15 typedef int int32_t; 16 typedef unsigned char uint8_t; 17 typedef int32_t UChar32; 18 typedef unsigned char UChar; 19 20 typedef struct _NSZone NSZone; 21 22 typedef const void * CFTypeRef; 23 CFTypeRef CFRetain(CFTypeRef cf); 24 id CFBridgingRelease(CFTypeRef CF_CONSUMED X); 25 26 NS_INLINE NS_RETURNS_RETAINED id NSMakeCollectable(CFTypeRef CF_CONSUMED cf) NS_AUTOMATED_REFCOUNT_UNAVAILABLE; 27 28 @protocol NSObject 29 - (BOOL)isEqual:(id)object; 30 - (NSZone *)zone NS_AUTOMATED_REFCOUNT_UNAVAILABLE; 31 - (id)retain NS_AUTOMATED_REFCOUNT_UNAVAILABLE; 32 - (NSUInteger)retainCount NS_AUTOMATED_REFCOUNT_UNAVAILABLE; 33 - (oneway void)release NS_AUTOMATED_REFCOUNT_UNAVAILABLE; 34 - (id)autorelease NS_AUTOMATED_REFCOUNT_UNAVAILABLE; 35 @end 36 37 @interface NSObject <NSObject> {} 38 - (id)init; 39 40 + (id)new; 41 + (id)alloc; 42 - (void)dealloc; 43 44 - (void)finalize; 45 46 - (id)copy; 47 - (id)mutableCopy; 48 @end 49 50 NS_AUTOMATED_REFCOUNT_UNAVAILABLE 51 @interface NSAutoreleasePool : NSObject { 52 @private 53 void *_token; 54 void *_reserved3; 55 void *_reserved2; 56 void *_reserved; 57 } 58 59 + (void)addObject:(id)anObject; 60 61 - (void)addObject:(id)anObject; 62 63 - (void)drain; 64 65 @end 66 67 typedef const void* objc_objectptr_t; 68 extern __attribute__((ns_returns_retained)) id objc_retainedObject(objc_objectptr_t __attribute__((cf_consumed)) pointer); 69 extern __attribute__((ns_returns_not_retained)) id objc_unretainedObject(objc_objectptr_t pointer); 70 extern objc_objectptr_t objc_unretainedPointer(id object); 71