Differences From Artifact [1619f8ecc0]:
- File src/macros.h — part of check-in [5116342c0a] at 2015-06-28 16:28:32 on branch trunk — Add OF_SUBCLASSING_RESTRICTED (user: js, size: 14926) [annotate] [blame] [check-ins using]
To Artifact [c42b7644a0]:
- File
src/macros.h
— part of check-in
[ea5a19118a]
at
2016-03-20 10:55:31
on branch 0.8
— undef __{unsafe_unretained,bridge,autoreleasing}
Newer versions of Clang have these as built-in defines, even when ARC is
disabled. (user: js, size: 15108) [annotate] [blame] [check-ins using]
1 | /* | | | | 1 2 3 4 5 6 7 8 9 10 | /* * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 * Jonathan Schleifer <js@heap.zone> * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE.QPL included in * the packaging of this file. * |
︙ | ︙ | |||
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 | # define OF_WEAK_UNAVAILABLE __attribute__((__objc_arc_weak_unavailable__)) #else # define OF_RETURNS_RETAINED # define OF_RETURNS_NOT_RETAINED # define OF_RETURNS_INNER_POINTER # define OF_CONSUMED # define OF_WEAK_UNAVAILABLE # define __unsafe_unretained # define __bridge # define __autoreleasing #endif #if __has_feature(objc_generics) # define OF_HAVE_GENERICS # define OF_GENERIC(...) <__VA_ARGS__> #else # define OF_GENERIC(...) #endif #if __has_feature(nullability) # define OF_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin") # define OF_ASSUME_NONNULL_END _Pragma("clang assume_nonnull end") | > > > > > > > | | | 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 | # define OF_WEAK_UNAVAILABLE __attribute__((__objc_arc_weak_unavailable__)) #else # define OF_RETURNS_RETAINED # define OF_RETURNS_NOT_RETAINED # define OF_RETURNS_INNER_POINTER # define OF_CONSUMED # define OF_WEAK_UNAVAILABLE /* * undef them first, as new Clang versions have these as built-in defines even * when ARC is disabled. */ # undef __unsafe_unretained # undef __bridge # undef __autoreleasing # define __unsafe_unretained # define __bridge # define __autoreleasing #endif #if __has_feature(objc_generics) # define OF_HAVE_GENERICS # define OF_GENERIC(...) <__VA_ARGS__> #else # define OF_GENERIC(...) #endif #if __has_feature(nullability) # define OF_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin") # define OF_ASSUME_NONNULL_END _Pragma("clang assume_nonnull end") # define OF_NONNULL _Nonnull # define OF_NULLABLE _Nullable # define OF_NULLABLE_PROPERTY(...) (__VA_ARGS__, nullable) #else # define OF_ASSUME_NONNULL_BEGIN # define OF_ASSUME_NONNULL_END # define OF_NONNULL # define OF_NULLABLE # define OF_NULLABLE_PROPERTY |
︙ | ︙ |