@@ -1,8 +1,8 @@ /* - * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 - * Jonathan Schleifer + * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 + * Jonathan Schleifer * * 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 @@ -160,10 +160,17 @@ # 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 @@ -175,12 +182,12 @@ #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_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