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