blob: 2603730cad9daacb2bc85be78cc0040b611d38e5 [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
Argyrios Kyrtzidis4532b552011-09-14 18:17:09 +00007#define CF_CONSUMED __attribute__((cf_consumed))
8
Argyrios Kyrtzidis18fd0c62011-07-27 05:28:18 +00009#define nil ((void*) 0)
10
John McCall8f0e8d22011-06-15 23:25:17 +000011typedef int BOOL;
12typedef unsigned NSUInteger;
13typedef int int32_t;
14typedef unsigned char uint8_t;
15typedef int32_t UChar32;
16typedef unsigned char UChar;
17
Argyrios Kyrtzidis18fd0c62011-07-27 05:28:18 +000018typedef struct _NSZone NSZone;
19
20typedef const void * CFTypeRef;
21CFTypeRef CFRetain(CFTypeRef cf);
22
John McCall8f0e8d22011-06-15 23:25:17 +000023@protocol NSObject
24- (BOOL)isEqual:(id)object;
Argyrios Kyrtzidis18fd0c62011-07-27 05:28:18 +000025- (NSZone *)zone NS_AUTOMATED_REFCOUNT_UNAVAILABLE;
John McCall8f0e8d22011-06-15 23:25:17 +000026- (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;
John McCall8f0e8d22011-06-15 23:25:17 +000030@end
31
32@interface NSObject <NSObject> {}
33- (id)init;
34
35+ (id)new;
John McCall8f0e8d22011-06-15 23:25:17 +000036+ (id)alloc;
37- (void)dealloc;
38
39- (void)finalize;
40
41- (id)copy;
42- (id)mutableCopy;
John McCall8f0e8d22011-06-15 23:25:17 +000043@end
44
John McCall8f0e8d22011-06-15 23:25:17 +000045NS_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
62typedef const void* objc_objectptr_t;
63extern __attribute__((ns_returns_retained)) id objc_retainedObject(objc_objectptr_t __attribute__((cf_consumed)) pointer);
64extern __attribute__((ns_returns_not_retained)) id objc_unretainedObject(objc_objectptr_t pointer);
65extern objc_objectptr_t objc_unretainedPointer(id object);