Add macros for non-null assumed sections

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39361 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Niels Grewe 2016-02-12 09:00:10 +00:00
parent 8a2bfb18b8
commit 472e941dbe
2 changed files with 17 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2016-02-12 Niels Grewe <niels.grewe@halbordnung.de>
* Headers/Foundation/NSObjCRuntime.h: Define macros for
non-null sections if available.
2016-02-10 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSThread.m: In GSCurrentThread() the check for exiting

View file

@ -150,6 +150,18 @@ extern "C" {
*/
#define NS_ENUM(...) _GS_GET_ENUM_MACRO(__VA_ARGS__,_GS_NAMED_ENUM,_GS_ANON_ENUM)(__VA_ARGS__)
/*
* If the compiler supports nullability qualifiers, we define the macros for
* non-null sections.
*/
#if __has_feature(nullability)
# define NS_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin")
# define NS_ASSUME_NONNULL_END _Pragma("clang assume_nonnull end")
#else
# define NS_ASSUME_NONNULL_BEGIN
# define NS_ASSUME_NONNULL_END
#endif
/** Bitfield used to specify options to control enumeration over collections.
*/
typedef NS_OPTIONS(NSUInteger, NSEnumerationOptions)