blob: c57f3e75e49eb9469b41f6d88a9bbfb9da16f6fb [file] [log] [blame]
John McCall8f0e8d22011-06-15 23:25:17 +00001#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
John McCall8f0e8d22011-06-15 23:25:17 +00007typedef 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;
John McCall8f0e8d22011-06-15 23:25:17 +000020@end
21
22@interface NSObject <NSObject> {}
23- (id)init;
24
25+ (id)new;
John McCall8f0e8d22011-06-15 23:25:17 +000026+ (id)alloc;
27- (void)dealloc;
28
29- (void)finalize;
30
31- (id)copy;
32- (id)mutableCopy;
John McCall8f0e8d22011-06-15 23:25:17 +000033@end
34
John McCall8f0e8d22011-06-15 23:25:17 +000035NS_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);