Differences From Artifact [bda35b67de]:
- File src/OFData.h — part of check-in [cc3ad3ddd3] at 2017-11-18 18:50:50 on branch trunk — Documentation: Use @brief for all properties (user: js, size: 8834) [annotate] [blame] [check-ins using]
To Artifact [507fa08959]:
- File
src/OFData.h
— part of check-in
[6cf7d6c33e]
at
2017-11-26 14:29:40
on branch trunk
— OFData: Change no copy handling
OFMutableData supports no copy now by just copying anyway and freeing if
required. (user: js, size: 8810) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
110 111 112 113 114 115 116 | * * @param items The items to store in the OFData * @param count The number of items * @param freeWhenDone Whether to free the pointer when it is no longer needed * by the OFData * @return A new autoreleased OFData */ | | | | 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | * * @param items The items to store in the OFData * @param count The number of items * @param freeWhenDone Whether to free the pointer when it is no longer needed * by the OFData * @return A new autoreleased OFData */ + (instancetype)dataWithItemsNoCopy: (void *)items count: (size_t)count freeWhenDone: (bool)freeWhenDone; /*! * @brief Creates a new OFData with the specified `count` items of the * specified size by taking ownership of the specified items pointer. * * @param items The items to store in the OFData * @param itemSize The item size of a single item in bytes * @param count The number of items * @param freeWhenDone Whether to free the pointer when it is no longer needed * by the OFData * @return A new autoreleased OFData */ + (instancetype)dataWithItemsNoCopy: (void *)items itemSize: (size_t)itemSize count: (size_t)count freeWhenDone: (bool)freeWhenDone; #ifdef OF_HAVE_FILES /*! * @brief Creates a new OFData with an item size of 1, containing the data of |
︙ | ︙ | |||
207 208 209 210 211 212 213 | * * @param items The items to store in the OFData * @param count The number of items * @param freeWhenDone Whether to free the pointer when it is no longer needed * by the OFData * @return An initialized OFData */ | | | | 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 | * * @param items The items to store in the OFData * @param count The number of items * @param freeWhenDone Whether to free the pointer when it is no longer needed * by the OFData * @return An initialized OFData */ - (instancetype)initWithItemsNoCopy: (void *)items count: (size_t)count freeWhenDone: (bool)freeWhenDone; /*! * @brief Initializes an already allocated OFData with the specified `count` * items of the specified size by taking ownership of the specified * items pointer. * * @param items The items to store in the OFData * @param itemSize The item size of a single item in bytes * @param count The number of items * @param freeWhenDone Whether to free the pointer when it is no longer needed * by the OFData * @return An initialized OFData */ - (instancetype)initWithItemsNoCopy: (void *)items itemSize: (size_t)itemSize count: (size_t)count freeWhenDone: (bool)freeWhenDone; #ifdef OF_HAVE_FILES /*! * @brief Initializes an already allocated OFData with an item size of 1, |
︙ | ︙ |