Common.h revision e0ac7454bae910ab3d67a92f6e2e5046d3bb8c1a
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 7e0ac7454bae910ab3d67a92f6e2e5046d3bb8c1aArgyrios Kyrtzidis#define NS_RETURNS_RETAINED __attribute__((ns_returns_retained)) 84532b5553db699d5bed250454f9a45e0f66f4bf8Argyrios Kyrtzidis#define CF_CONSUMED __attribute__((cf_consumed)) 94532b5553db699d5bed250454f9a45e0f66f4bf8Argyrios Kyrtzidis 10e0ac7454bae910ab3d67a92f6e2e5046d3bb8c1aArgyrios Kyrtzidis#define NS_INLINE static __inline__ __attribute__((always_inline)) 1118fd0c6915b45c4daafe18e3cd324c13306f913fArgyrios Kyrtzidis#define nil ((void*) 0) 1218fd0c6915b45c4daafe18e3cd324c13306f913fArgyrios Kyrtzidis 138f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCalltypedef int BOOL; 148f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCalltypedef unsigned NSUInteger; 158f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCalltypedef int int32_t; 168f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCalltypedef unsigned char uint8_t; 178f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCalltypedef int32_t UChar32; 188f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCalltypedef unsigned char UChar; 198f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall 2018fd0c6915b45c4daafe18e3cd324c13306f913fArgyrios Kyrtzidistypedef struct _NSZone NSZone; 2118fd0c6915b45c4daafe18e3cd324c13306f913fArgyrios Kyrtzidis 2218fd0c6915b45c4daafe18e3cd324c13306f913fArgyrios Kyrtzidistypedef const void * CFTypeRef; 2318fd0c6915b45c4daafe18e3cd324c13306f913fArgyrios KyrtzidisCFTypeRef CFRetain(CFTypeRef cf); 24e0ac7454bae910ab3d67a92f6e2e5046d3bb8c1aArgyrios Kyrtzidisid CFBridgingRelease(CFTypeRef CF_CONSUMED X); 25e0ac7454bae910ab3d67a92f6e2e5046d3bb8c1aArgyrios Kyrtzidis 26e0ac7454bae910ab3d67a92f6e2e5046d3bb8c1aArgyrios KyrtzidisNS_INLINE NS_RETURNS_RETAINED id NSMakeCollectable(CFTypeRef CF_CONSUMED cf) NS_AUTOMATED_REFCOUNT_UNAVAILABLE; 2718fd0c6915b45c4daafe18e3cd324c13306f913fArgyrios Kyrtzidis 288f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall@protocol NSObject 298f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall- (BOOL)isEqual:(id)object; 3018fd0c6915b45c4daafe18e3cd324c13306f913fArgyrios Kyrtzidis- (NSZone *)zone NS_AUTOMATED_REFCOUNT_UNAVAILABLE; 318f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall- (id)retain NS_AUTOMATED_REFCOUNT_UNAVAILABLE; 328f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall- (NSUInteger)retainCount NS_AUTOMATED_REFCOUNT_UNAVAILABLE; 338f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall- (oneway void)release NS_AUTOMATED_REFCOUNT_UNAVAILABLE; 348f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall- (id)autorelease NS_AUTOMATED_REFCOUNT_UNAVAILABLE; 358f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall@end 368f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall 378f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall@interface NSObject <NSObject> {} 388f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall- (id)init; 398f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall 408f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall+ (id)new; 418f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall+ (id)alloc; 428f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall- (void)dealloc; 438f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall 448f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall- (void)finalize; 458f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall 468f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall- (id)copy; 478f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall- (id)mutableCopy; 488f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall@end 498f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall 508f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCallNS_AUTOMATED_REFCOUNT_UNAVAILABLE 518f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall@interface NSAutoreleasePool : NSObject { 528f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall@private 538f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall void *_token; 548f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall void *_reserved3; 558f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall void *_reserved2; 568f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall void *_reserved; 578f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall} 588f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall 598f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall+ (void)addObject:(id)anObject; 608f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall 618f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall- (void)addObject:(id)anObject; 628f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall 638f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall- (void)drain; 648f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall 658f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall@end 668f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCall 678f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCalltypedef const void* objc_objectptr_t; 688f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCallextern __attribute__((ns_returns_retained)) id objc_retainedObject(objc_objectptr_t __attribute__((cf_consumed)) pointer); 698f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCallextern __attribute__((ns_returns_not_retained)) id objc_unretainedObject(objc_objectptr_t pointer); 708f0e8d22960d56f8390f4971e2c0f2f0a0884602John McCallextern objc_objectptr_t objc_unretainedPointer(id object); 71