mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Also, use "#include <objc/NSObject.h>" instead of "@import ObjectiveC;" to get access to BOOL, SEL, NSObject, and NSString. This allows generated headers to be used in Objective-C++ contexts, where modules don't yet work. The dependencies will unfortunately need to be imported separately (because there's not a direct mapping from module name back to header file), but that's still better than just being incompatible. <rdar://problem/16796627> Swift SVN r17272
19 lines
502 B
C
19 lines
502 B
C
#ifndef OBJC_OBJC_H_
|
|
#define OBJC_OBJC_H_
|
|
|
|
#define OBJC_ARC_UNAVAILABLE __attribute__((unavailable("not available in automatic reference counting mode")))
|
|
#define NS_AUTOMATED_REFCOUNT_UNAVAILABLE OBJC_ARC_UNAVAILABLE
|
|
|
|
typedef unsigned long NSUInteger;
|
|
typedef long NSInteger;
|
|
typedef signed char BOOL;
|
|
|
|
typedef struct objc_selector *SEL;
|
|
SEL sel_registerName(const char *str);
|
|
|
|
void NSDeallocateObject(id object) NS_AUTOMATED_REFCOUNT_UNAVAILABLE;
|
|
|
|
#undef NS_AUTOMATED_REFCOUNT_UNAVAILABLE
|
|
|
|
#endif
|