blob: f10ae0d2a73645badd907727672d4c040b5b79a8 [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 Kyrtzidis18fd0c62011-07-27 05:28:18 +00007#define nil ((void*) 0)
8
John McCall8f0e8d22011-06-15 23:25:17 +00009typedef int BOOL;
10typedef unsigned NSUInteger;
11typedef int int32_t;
12typedef unsigned char uint8_t;
13typedef int32_t UChar32;
14typedef unsigned char UChar;
15
Argyrios Kyrtzidis18fd0c62011-07-27 05:28:18 +000016typedef struct _NSZone NSZone;
17
18typedef const void * CFTypeRef;
19CFTypeRef CFRetain(CFTypeRef cf);
20
John McCall8f0e8d22011-06-15 23:25:17 +000021@protocol NSObject
22- (BOOL)isEqual:(id)object;
Argyrios Kyrtzidis18fd0c62011-07-27 05:28:18 +000023- (NSZone *)zone NS_AUTOMATED_REFCOUNT_UNAVAILABLE;
John McCall8f0e8d22011-06-15 23:25:17 +000024- (id)retain NS_AUTOMATED_REFCOUNT_UNAVAILABLE;
25- (NSUInteger)retainCount NS_AUTOMATED_REFCOUNT_UNAVAILABLE;
26- (oneway void)release NS_AUTOMATED_REFCOUNT_UNAVAILABLE;
27- (id)autorelease NS_AUTOMATED_REFCOUNT_UNAVAILABLE;
John McCall8f0e8d22011-06-15 23:25:17 +000028@end
29
30@interface NSObject <NSObject> {}
31- (id)init;
32
33+ (id)new;
John McCall8f0e8d22011-06-15 23:25:17 +000034+ (id)alloc;
35- (void)dealloc;
36
37- (void)finalize;
38
39- (id)copy;
40- (id)mutableCopy;
John McCall8f0e8d22011-06-15 23:25:17 +000041@end
42
John McCall8f0e8d22011-06-15 23:25:17 +000043NS_AUTOMATED_REFCOUNT_UNAVAILABLE
44@interface NSAutoreleasePool : NSObject {
45@private
46 void *_token;
47 void *_reserved3;
48 void *_reserved2;
49 void *_reserved;
50}
51
52+ (void)addObject:(id)anObject;
53
54- (void)addObject:(id)anObject;
55
56- (void)drain;
57
58@end
59
60typedef const void* objc_objectptr_t;
61extern __attribute__((ns_returns_retained)) id objc_retainedObject(objc_objectptr_t __attribute__((cf_consumed)) pointer);
62extern __attribute__((ns_returns_not_retained)) id objc_unretainedObject(objc_objectptr_t pointer);
63extern objc_objectptr_t objc_unretainedPointer(id object);