|
19 | 19 | * |
20 | 20 | */ |
21 | 21 |
|
| 22 | +#import <Availability.h> |
| 23 | +#import <TargetConditionals.h> |
| 24 | + |
22 | 25 | #ifndef ParseUI_ParseUIConstants_h |
23 | 26 | #define ParseUI_ParseUIConstants_h |
24 | 27 |
|
| 28 | +///-------------------------------------- |
| 29 | +/// @name Deprecated Macros |
| 30 | +///-------------------------------------- |
| 31 | + |
25 | 32 | #ifndef PARSE_UI_DEPRECATED |
26 | | - #ifdef __deprecated_msg |
27 | | - #define PARSE_UI_DEPRECATED(_MSG) (deprecated(_MSG)) |
28 | | - #else |
29 | | - #ifdef __deprecated |
30 | | - #define PARSE_UI_DEPRECATED(_MSG) (deprecated) |
31 | | - #else |
32 | | - #define PARSE_UI_DEPRECATED(_MSG) |
33 | | - #endif |
34 | | - #endif |
| 33 | +# ifdef __deprecated_msg |
| 34 | +# define PARSE_UI_DEPRECATED(_MSG) (deprecated(_MSG)) |
| 35 | +# else |
| 36 | +# ifdef __deprecated |
| 37 | +# define PARSE_UI_DEPRECATED(_MSG) (deprecated) |
| 38 | +# else |
| 39 | +# define PARSE_UI_DEPRECATED(_MSG) |
| 40 | +# endif |
| 41 | +# endif |
| 42 | +#endif |
| 43 | + |
| 44 | +///-------------------------------------- |
| 45 | +/// @name Nullability Support |
| 46 | +///-------------------------------------- |
| 47 | + |
| 48 | +#if __has_feature(nullability) |
| 49 | +# define PFUI_NULLABLE nullable |
| 50 | +# define PFUI_NULLABLE_S __nullable |
| 51 | +# define PFUI_NULL_UNSPECIFIED null_unspecified |
| 52 | +# define PFUI_NULLABLE_PROPERTY nullable, |
| 53 | +#else |
| 54 | +# define PFUI_NULLABLE |
| 55 | +# define PFUI_NULLABLE_S |
| 56 | +# define PFUI_NULL_UNSPECIFIED |
| 57 | +# define PFUI_NULLABLE_PROPERTY |
| 58 | +#endif |
| 59 | + |
| 60 | +#if __has_feature(assume_nonnull) |
| 61 | +# ifdef NS_ASSUME_NONNULL_BEGIN |
| 62 | +# define PFUI_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN |
| 63 | +# else |
| 64 | +# define PFUI_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin") |
| 65 | +# endif |
| 66 | +# ifdef NS_ASSUME_NONNULL_END |
| 67 | +# define PFUI_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END |
| 68 | +# else |
| 69 | +# define PFUI_ASSUME_NONNULL_END _Pragma("clang assume_nonnull end") |
| 70 | +# endif |
| 71 | +#else |
| 72 | +# define PFUI_ASSUME_NONNULL_BEGIN |
| 73 | +# define PFUI_ASSUME_NONNULL_END |
35 | 74 | #endif |
36 | 75 |
|
37 | 76 | #endif |
0 commit comments