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