Common.h revision 18fd0c6915b45c4daafe18e3cd324c13306f913f
18f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall#if __has_feature(objc_arr) 28f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall#define NS_AUTOMATED_REFCOUNT_UNAVAILABLE __attribute__((unavailable("not available in automatic reference counting mode"))) 38f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall#else 48f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall#define NS_AUTOMATED_REFCOUNT_UNAVAILABLE 58f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall#endif 68f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall 718fd0c6915b45c4daafe18e3cd324c13306f913fArgyrios Kyrtzidis#define nil ((void*) 0) 818fd0c6915b45c4daafe18e3cd324c13306f913fArgyrios Kyrtzidis 98f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCalltypedef int BOOL; 108f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCalltypedef unsigned NSUInteger; 118f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCalltypedef int int32_t; 128f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCalltypedef unsigned char uint8_t; 138f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCalltypedef int32_t UChar32; 148f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCalltypedef unsigned char UChar; 158f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall 1618fd0c6915b45c4daafe18e3cd324c13306f913fArgyrios Kyrtzidistypedef struct _NSZone NSZone; 1718fd0c6915b45c4daafe18e3cd324c13306f913fArgyrios Kyrtzidis 1818fd0c6915b45c4daafe18e3cd324c13306f913fArgyrios Kyrtzidistypedef const void * CFTypeRef; 1918fd0c6915b45c4daafe18e3cd324c13306f913fArgyrios KyrtzidisCFTypeRef CFRetain(CFTypeRef cf); 2018fd0c6915b45c4daafe18e3cd324c13306f913fArgyrios Kyrtzidis 218f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall@protocol NSObject 228f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall- (BOOL)isEqual:(id)object; 2318fd0c6915b45c4daafe18e3cd324c13306f913fArgyrios Kyrtzidis- (NSZone *)zone NS_AUTOMATED_REFCOUNT_UNAVAILABLE; 248f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall- (id)retain NS_AUTOMATED_REFCOUNT_UNAVAILABLE; 258f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall- (NSUInteger)retainCount NS_AUTOMATED_REFCOUNT_UNAVAILABLE; 268f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall- (oneway void)release NS_AUTOMATED_REFCOUNT_UNAVAILABLE; 278f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall- (id)autorelease NS_AUTOMATED_REFCOUNT_UNAVAILABLE; 288f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall@end 298f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall 308f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall@interface NSObject <NSObject> {} 318f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall- (id)init; 328f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall 338f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall+ (id)new; 348f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall+ (id)alloc; 358f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall- (void)dealloc; 368f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall 378f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall- (void)finalize; 388f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall 398f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall- (id)copy; 408f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall- (id)mutableCopy; 418f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall@end 428f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall 438f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCallNS_AUTOMATED_REFCOUNT_UNAVAILABLE 448f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall@interface NSAutoreleasePool : NSObject { 458f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall@private 468f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall void *_token; 478f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall void *_reserved3; 488f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall void *_reserved2; 498f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall void *_reserved; 508f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall} 518f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall 528f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall+ (void)addObject:(id)anObject; 538f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall 548f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall- (void)addObject:(id)anObject; 558f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall 568f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall- (void)drain; 578f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall 588f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall@end 598f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall 608f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCalltypedef const void* objc_objectptr_t; 618f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCallextern __attribute__((ns_returns_retained)) id objc_retainedObject(objc_objectptr_t __attribute__((cf_consumed)) pointer); 628f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCallextern __attribute__((ns_returns_not_retained)) id objc_unretainedObject(objc_objectptr_t pointer); 638f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCallextern objc_objectptr_t objc_unretainedPointer(id object); 64