Differences From Artifact [0bfaa52216]:
- File
src/OFMutableArray.m
— part of check-in
[95e8e1e486]
at
2012-06-10 16:03:01
on branch trunk
— Add a few array methods.
OFArray:
* +[arrayByAddingObject:]
* +[arrayByAddingObjectsFromArray:]OFMutableArray:
* -[addObjectsFromArray:]
* -[insertObjectsFromArray:atIndex:] (user: js, size: 7032) [annotate] [blame] [check-ins using] [more...]
To Artifact [a85051edf1]:
- File src/OFMutableArray.m — part of check-in [8892ae9fcc] at 2012-07-12 01:28:46 on branch trunk — Don't access isa directly. (user: js, size: 7118) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
135 136 137 138 139 140 141 | - (void)release { } - (void)dealloc { | | > | | | | 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | - (void)release { } - (void)dealloc { @throw [OFNotImplementedException exceptionWithClass: [self class] selector: _cmd]; [super dealloc]; /* Get rid of a stupid warning */ } @end @implementation OFMutableArray + (void)initialize { if (self == [OFMutableArray class]) object_setClass((id)&placeholder, [OFMutableArray_placeholder class]); } + alloc { if (self == [OFMutableArray class]) return (id)&placeholder; return [super alloc]; } - init { if (object_getClass(self) == [OFMutableArray class]) { Class c = [self class]; [self release]; @throw [OFNotImplementedException exceptionWithClass: c selector: _cmd]; } return [super init]; } |
︙ | ︙ | |||
188 189 190 191 192 193 194 | [self insertObjectsFromArray: array atIndex: [self count]]; } - (void)insertObject: (id)object atIndex: (size_t)index { | | | 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 | [self insertObjectsFromArray: array atIndex: [self count]]; } - (void)insertObject: (id)object atIndex: (size_t)index { @throw [OFNotImplementedException exceptionWithClass: [self class] selector: _cmd]; } - (void)insertObjectsFromArray: (OFArray*)array atIndex: (size_t)index { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; |
︙ | ︙ | |||
214 215 216 217 218 219 220 | [pool release]; } - (void)replaceObjectAtIndex: (size_t)index withObject: (id)object { | | | 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 | [pool release]; } - (void)replaceObjectAtIndex: (size_t)index withObject: (id)object { @throw [OFNotImplementedException exceptionWithClass: [self class] selector: _cmd]; } - (void)setObject: (id)object atIndexedSubscript: (size_t)index { [self replaceObjectAtIndex: index |
︙ | ︙ | |||
256 257 258 259 260 261 262 | return; } } } - (void)removeObjectAtIndex: (size_t)index { | | | 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 | return; } } } - (void)removeObjectAtIndex: (size_t)index { @throw [OFNotImplementedException exceptionWithClass: [self class] selector: _cmd]; } - (void)removeObject: (id)object { size_t i, count = [self count]; |
︙ | ︙ |