Differences From Artifact [50b79cf523]:
- File src/OFMutableArray_adjacent.m — part of check-in [6f0ef1c5e1] at 2012-06-06 13:14:23 on branch trunk — Remove -[OFMutableArray removeNObjects:]. (user: js, size: 6040) [annotate] [blame] [check-ins using]
To Artifact [489af893ca]:
- File
src/OFMutableArray_adjacent.m
— part of check-in
[f7576a66ce]
at
2012-06-06 13:47:52
on branch trunk
— Slightly change the memory management API.
Also fix a bug where OFBigDataArray would waste memory. (user: js, size: 6049) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
160 161 162 163 164 165 166 | { id *objects = [array cArray], *copy; size_t i, count = [array count]; if (range.length > count - range.start) @throw [OFOutOfRangeException exceptionWithClass: isa]; | | | | 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | { id *objects = [array cArray], *copy; size_t i, count = [array count]; if (range.length > count - range.start) @throw [OFOutOfRangeException exceptionWithClass: isa]; copy = [self allocMemoryWithItemSize: sizeof(*copy) count: range.length]; memcpy(copy, objects + range.start, range.length * sizeof(id)); @try { [array removeItemsInRange: range]; mutations++; for (i = 0; i < range.length; i++) |
︙ | ︙ |