Common.h revision 7707c75ff98e26aa939557e3bf80490556c00ae4
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 7typedef int BOOL; 8typedef unsigned NSUInteger; 9typedef int int32_t; 10typedef unsigned char uint8_t; 11typedef int32_t UChar32; 12typedef unsigned char UChar; 13 14@protocol NSObject 15- (BOOL)isEqual:(id)object; 16- (id)retain NS_AUTOMATED_REFCOUNT_UNAVAILABLE; 17- (NSUInteger)retainCount NS_AUTOMATED_REFCOUNT_UNAVAILABLE; 18- (oneway void)release NS_AUTOMATED_REFCOUNT_UNAVAILABLE; 19- (id)autorelease NS_AUTOMATED_REFCOUNT_UNAVAILABLE; 20@end 21 22@interface NSObject <NSObject> {} 23- (id)init; 24 25+ (id)new; 26+ (id)alloc; 27- (void)dealloc; 28 29- (void)finalize; 30 31- (id)copy; 32- (id)mutableCopy; 33@end 34 35NS_AUTOMATED_REFCOUNT_UNAVAILABLE 36@interface NSAutoreleasePool : NSObject { 37@private 38 void *_token; 39 void *_reserved3; 40 void *_reserved2; 41 void *_reserved; 42} 43 44+ (void)addObject:(id)anObject; 45 46- (void)addObject:(id)anObject; 47 48- (void)drain; 49 50@end 51 52typedef const void* objc_objectptr_t; 53extern __attribute__((ns_returns_retained)) id objc_retainedObject(objc_objectptr_t __attribute__((cf_consumed)) pointer); 54extern __attribute__((ns_returns_not_retained)) id objc_unretainedObject(objc_objectptr_t pointer); 55extern objc_objectptr_t objc_unretainedPointer(id object); 56