Differences From Artifact [9a07b7851a]:
- File
src/OFArray_adjacent.m
— part of check-in
[1255f3a11a]
at
2012-08-10 20:08:24
on branch trunk
— Directly use the runtime's autorelease pools.
This greatly improves performance, as it gets rid of the overhead of
OFAutoreleasePool. (user: js, size: 6274) [annotate] [blame] [check-ins using]
To Artifact [96ab47295a]:
- File src/OFArray_adjacent.m — part of check-in [c9433ea60d] at 2012-10-14 00:54:58 on branch trunk — range.start -> range.location. (user: js, size: 6286) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
208 209 210 211 212 213 214 | - (void)getObjects: (id*)buffer inRange: (of_range_t)range { id *objects = [array cArray]; size_t i, count = [array count]; | | | | 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 | - (void)getObjects: (id*)buffer inRange: (of_range_t)range { id *objects = [array cArray]; size_t i, count = [array count]; if (range.location + range.length > count) @throw [OFOutOfRangeException exceptionWithClass: [self class]]; for (i = 0; i < range.length; i++) buffer[i] = objects[range.location + i]; } - (size_t)indexOfObject: (id)object { id *objects = [array cArray]; size_t i, count = [array count]; |
︙ | ︙ | |||
250 251 252 253 254 255 256 | if (![self isKindOfClass: [OFMutableArray class]]) return [OFArray_adjacentSubarray arrayWithArray: self range: range]; count = [array count]; | | | | 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 | if (![self isKindOfClass: [OFMutableArray class]]) return [OFArray_adjacentSubarray arrayWithArray: self range: range]; count = [array count]; if (range.location + range.length > count) @throw [OFOutOfRangeException exceptionWithClass: [self class]]; return [OFArray arrayWithObjects: (id*)[array cArray] + range.location count: range.length]; } - (BOOL)isEqual: (id)object { OFArray *otherArray; id *objects, *otherObjects; |
︙ | ︙ |