Differences From Artifact [181efadcb0]:
- File src/OFArray.m — part of check-in [e0d581d524] at 2010-06-13 17:42:09 on branch trunk — Fix initialization of mutations in OF{Array,Dictionary}Enumerator. (user: js, size: 6660) [annotate] [blame] [check-ins using]
To Artifact [3b7a88e4d4]:
- File
src/OFArray.m
— part of check-in
[d4b379485a]
at
2010-07-08 08:57:00
on branch trunk
— Don't retain + autorelease objects returned from collections.
This increases performance and should not need to be handled by the
programmer in most cases. (user: js, size: 6591) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
207 208 209 210 211 212 213 | [objs[i] retain]; return new; } - (id)objectAtIndex: (size_t)index { | | | 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 | [objs[i] retain]; return new; } - (id)objectAtIndex: (size_t)index { return *((OFObject**)[array itemAtIndex: index]); } - (size_t)indexOfObject: (OFObject*)obj { id *objs = [array cArray]; size_t i, count = [array count]; |
︙ | ︙ | |||
244 245 246 247 248 249 250 | return SIZE_MAX; } - (id)firstObject { id *first = [array firstItem]; | | | | 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 | return SIZE_MAX; } - (id)firstObject { id *first = [array firstItem]; return (first != NULL ? *first : nil); } - (id)lastObject { id *last = [array lastItem]; return (last != NULL ? *last : nil); } - (OFString*)componentsJoinedByString: (OFString*)separator { OFString *str; OFString **objs = [array cArray]; size_t i, count = [array count]; |
︙ | ︙ |