@@ -67,20 +67,20 @@ * * @param object The object to map * @param index The index of the object to map * @return The object to map to */ -typedef __nonnull id (^of_array_map_block_t)(id object, size_t index); +typedef id OF_NONNULL (^of_array_map_block_t)(id object, size_t index); /*! * @brief A block for folding an OFArray. * * @param left The object to which the object has been folded so far * @param right The object that should be added to the left object * @return The left and right side folded into one object */ -typedef __nullable id (^of_array_fold_block_t)(__nullable id left, id right); +typedef id OF_NULLABLE (^of_array_fold_block_t)(id OF_NULLABLE left, id right); #endif /*! * @class OFArray OFArray.h ObjFW/OFArray.h * @@ -137,12 +137,13 @@ * * @param objects A C array of objects * @param count The length of the C array * @return A new autoreleased OFArray */ -+ (instancetype)arrayWithObjects: (__nonnull ObjectType const *__nonnull)objects - count: (size_t)count; ++ (instancetype) + arrayWithObjects: (ObjectType const OF_NONNULL *OF_NONNULL)objects + count: (size_t)count; /*! * @brief Initializes an OFArray with the specified object. * * @param object An object @@ -182,11 +183,11 @@ * * @param objects A C array of objects * @param count The length of the C array * @return An initialized OFArray */ -- initWithObjects: (__nonnull ObjectType const *__nonnull)objects +- initWithObjects: (ObjectType const OF_NONNULL *OF_NONNULL)objects count: (size_t)count; /*! * @brief Returns the object at the specified index in the array. * @@ -203,19 +204,20 @@ * @brief Copies the objects at the specified range to the specified buffer. * * @param buffer The buffer to copy the objects to * @param range The range to copy */ -- (void)getObjects: (__unsafe_unretained __nonnull ObjectType *__nonnull)buffer +- (void)getObjects: (ObjectType __unsafe_unretained OF_NONNULL *OF_NONNULL) + buffer inRange: (of_range_t)range; /*! * @brief Returns the objects of the array as a C array. * * @return The objects of the array as a C array */ -- (__nonnull ObjectType const *__nonnull)objects; +- (ObjectType const __unsafe_unretained OF_NONNULL *OF_NONNULL)objects; /*! * @brief Returns the index of the first object that is equivalent to the * specified object or `OF_NOT_FOUND` if it was not found. * @@ -467,11 +469,11 @@ unsigned long *_mutationsPtr; size_t _position; } - initWithArray: (OFArray*)data - mutationsPtr: (__nullable unsigned long*)mutationsPtr; + mutationsPtr: (unsigned long *OF_NULLABLE)mutationsPtr; @end OF_ASSUME_NONNULL_END #import "OFMutableArray.h"