Created
June 18, 2015 14:58
-
-
Save tonyarnold/6e17ada0ecf859d5a036 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef MagicalRecordXcode7CompatibilityMacros_h | |
#define MagicalRecordXcode7CompatibilityMacros_h | |
#if __has_feature(nullability) | |
#define MR_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN | |
#define MR_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END | |
#define MR_nullable nullable | |
#define MR_nonnull nonnull | |
#define __MR_nullable __nullable | |
#define __MR_nonnull __nonnull | |
#else | |
#define MR_ASSUME_NONNULL_BEGIN | |
#define MR_ASSUME_NONNULL_END | |
#define MR_nullable | |
#define MR_nonnull | |
#define __MR_nullable | |
#define __MR_nonnull | |
#endif | |
#if __has_feature(objc_generics) | |
#define MR_GENERIC(class, ...) class<__VA_ARGS__> | |
#define MR_GENERIC_TYPE(type) type | |
#define __MR_kindof(class) __kindof class | |
#else | |
#define MR_GENERIC(class, ...) class | |
#define MR_GENERIC_TYPE(type) id | |
#define __MR_kindof(class) id | |
#endif | |
#endif /* MagicalRecordXcode7CompatibilityMacros_h */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment