Index: src/OFData.h ================================================================== --- src/OFData.h +++ src/OFData.h @@ -43,15 +43,15 @@ * for OFData with item size 1. */ @interface OFData: OFObject { - unsigned char *_items; + unsigned char *_Nullable _items; size_t _count, _itemSize; bool _freeWhenDone; @private - OFData *_parentData; + OFData *_Nullable _parentData; OF_RESERVE_IVARS(OFData, 4) } /** * @brief The size of a single item in the OFData in bytes. @@ -66,11 +66,12 @@ /** * @brief All elements of the OFData as a C array. * * @warning The pointer is only valid until the OFData is changed! */ -@property (readonly, nonatomic) const void *items OF_RETURNS_INNER_POINTER; +@property OF_NULLABLE_PROPERTY (readonly, nonatomic) const void *items + OF_RETURNS_INNER_POINTER; /** * @brief The first item of the OFData or `NULL`. */ @property OF_NULLABLE_PROPERTY (readonly, nonatomic) const void *firstItem @@ -173,13 +174,13 @@ */ + (instancetype)dataWithContentsOfURL: (OFURL *)URL; /** * @brief Creates a new OFData with an item size of 1, containing the data of - * the string representation. + * the hex string representation. * - * @param string The string representation of the data + * @param string The hex string representation of the data * @return A new autoreleased OFData */ + (instancetype)dataWithStringRepresentation: (OFString *)string; /** @@ -190,21 +191,21 @@ * @return A new autoreleased OFData */ + (instancetype)dataWithBase64EncodedString: (OFString *)string; /** - * @brief Initialized an already allocated OFData with the specified `count` + * @brief Initializes an already allocated OFData with the specified `count` * items of size 1. * * @param items The items to store in the OFData * @param count The number of items * @return An initialized OFData */ - (instancetype)initWithItems: (const void *)items count: (size_t)count; /** - * @brief Initialized an already allocated OFData with the specified `count` + * @brief Initializes an already allocated OFData with the specified `count` * items of the specified size. * * @param items The items to store in the OFData * @param count The number of items * @param itemSize The item size of a single item in bytes @@ -272,13 +273,13 @@ */ - (instancetype)initWithContentsOfURL: (OFURL *)URL; /** * @brief Initializes an already allocated OFData with an item size of 1, - * containing the data of the string representation. + * containing the data of the hex string representation. * - * @param string The string representation of the data + * @param string The hex string representation of the data * @return A new autoreleased OFData */ - (instancetype)initWithStringRepresentation: (OFString *)string; /** Index: src/OFMutableData.h ================================================================== --- src/OFMutableData.h +++ src/OFMutableData.h @@ -37,11 +37,12 @@ * @warning The pointer is only valid until the OFMutableData is changed! * * Modifying the returned array directly is allowed and will change the contents * of the data. */ -@property (readonly, nonatomic) void *mutableItems OF_RETURNS_INNER_POINTER; +@property OF_NULLABLE_PROPERTY (readonly, nonatomic) void *mutableItems + OF_RETURNS_INNER_POINTER; /** * @brief The first item of the OFMutableData or `NULL`. */ @property OF_NULLABLE_PROPERTY (readonly, nonatomic) void *mutableFirstItem