Author: thebeing
Date: Fri Feb 12 10:00:10 2016
New Revision: 39361
URL: http://svn.gna.org/viewcvs/gnustep?rev=39361&view=rev
Log:
Add macros for non-null assumed sections
Modified:
libs/base/trunk/ChangeLog
libs/base/trunk/Headers/Foundation/NSObjCRuntime.h
Modified: libs/base/trunk/ChangeLog
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/ChangeLog?rev=39361&r1=39360&r2=39361&view=diff
==============================================================================
--- libs/base/trunk/ChangeLog (original)
+++ libs/base/trunk/ChangeLog Fri Feb 12 10:00:10 2016
@@ -1,3 +1,8 @@
+2016-02-12 Niels Grewe <[email protected]>
+
+ * Headers/Foundation/NSObjCRuntime.h: Define macros for
+ non-null sections if available.
+
2016-02-10 Richard Frith-Macdonald <[email protected]>
* Source/NSThread.m: In GSCurrentThread() the check for exiting
Modified: libs/base/trunk/Headers/Foundation/NSObjCRuntime.h
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Headers/Foundation/NSObjCRuntime.h?rev=39361&r1=39360&r2=39361&view=diff
==============================================================================
--- libs/base/trunk/Headers/Foundation/NSObjCRuntime.h (original)
+++ libs/base/trunk/Headers/Foundation/NSObjCRuntime.h Fri Feb 12 10:00:10 2016
@@ -150,6 +150,18 @@
*/
#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)
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs