Differences From Artifact [37d0e0f0dd]:
- File
src/OFArray.m
— part of check-in
[2a4aa05a84]
at
2009-05-05 12:05:06
on branch trunk
— Rename OFArray to OFDataArray and add a new OFArray which stores objects.
Additionally, change OFAutoreleasePool to use the new OFArray.And while at it, change #import <config.h> in some files to
#import "config.h". (user: js, size: 1793) [annotate] [blame] [check-ins using]
To Artifact [340e813c87]:
- File
src/OFArray.m
— part of check-in
[9338313079]
at
2009-05-05 14:00:10
on branch trunk
— There is a good reason to return id and not OFObject*.
When using OFObject*, you have to cast to get rid of a warning when
calling methods on the returned object. (user: js, size: 1779) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
58 59 60 61 62 63 64 | for (i = 0; i < len; i++) [objs[i] retain]; return new; } | | | | 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | for (i = 0; i < len; i++) [objs[i] retain]; return new; } - (id)object: (size_t)index { return *((OFObject**)[array item: index]); } - (id)last { return *((OFObject**)[array last]); } - add: (OFObject*)obj { [array add: &obj]; |
︙ | ︙ |