Author: thebeing
Date: Tue Jul 12 16:30:21 2016
New Revision: 39986
URL: http://svn.gna.org/viewcvs/gnustep?rev=39986&view=rev
Log:
Add NS_DESIGNATED_INITIALIZER macro
Modified:
libs/base/trunk/ChangeLog
libs/base/trunk/Headers/Foundation/NSObjCRuntime.h
libs/base/trunk/Headers/GNUstepBase/GNUstep.h
Modified: libs/base/trunk/ChangeLog
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/ChangeLog?rev=39986&r1=39985&r2=39986&view=diff
==============================================================================
--- libs/base/trunk/ChangeLog (original)
+++ libs/base/trunk/ChangeLog Tue Jul 12 16:30:21 2016
@@ -1,3 +1,10 @@
+2016-07-12 Niels Grewe <[email protected]>
+
+ * Headers/Foundation/NSObjCRuntime.h
+ * Headers/GNUstepBase/GNUstep.h:
+
+ Add NS_DESIGNATED_INITIALIZER macro
+
2016-07-12 Richard Frith-Macdonald <[email protected]>
* Source/GSICUString.m (UTextNSStringAccess):
Modified: libs/base/trunk/Headers/Foundation/NSObjCRuntime.h
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Headers/Foundation/NSObjCRuntime.h?rev=39986&r1=39985&r2=39986&view=diff
==============================================================================
--- libs/base/trunk/Headers/Foundation/NSObjCRuntime.h (original)
+++ libs/base/trunk/Headers/Foundation/NSObjCRuntime.h Tue Jul 12 16:30:21 2016
@@ -181,6 +181,15 @@
#endif
#define GS_GENERIC_TYPE(typeRef) GS_GENERIC_TYPE_F(typeRef, id)
+/**
+ * Backwards compatibility macro for the objc_designated_initializer attribute
+ */
+#if __has_attribute(objc_designated_initializer)
+# define NS_DESIGNATED_INITIALIZER
__attribute__((objc_designated_initializer))
+#else
+# define NS_DESIGNATED_INITIALIZER
+#endif
+
/** Bitfield used to specify options to control enumeration over collections.
*/
typedef NS_OPTIONS(NSUInteger, NSEnumerationOptions)
Modified: libs/base/trunk/Headers/GNUstepBase/GNUstep.h
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Headers/GNUstepBase/GNUstep.h?rev=39986&r1=39985&r2=39986&view=diff
==============================================================================
--- libs/base/trunk/Headers/GNUstepBase/GNUstep.h (original)
+++ libs/base/trunk/Headers/GNUstepBase/GNUstep.h Tue Jul 12 16:30:21 2016
@@ -44,6 +44,14 @@
# define __has_extension(x) __has_feature(x)
#endif
+/*
+ * __has_attribute is the equivalent to __has_feature and __has_extension
+ * for GNU-style attributes.
+ */
+#ifndef __has_attribute
+# define __has_attribute(x) 0
+#endif
+
#if __has_feature(objc_arc)
#ifndef RETAIN
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs