Differences From Artifact [baf90bc720]:
- File src/OFArray.m — part of check-in [a6f520157a] at 2023-08-08 15:32:43 on branch trunk — A few minor cleanups (user: js, size: 17548) [annotate] [blame] [check-ins using]
To Artifact [9b0a605b93]:
- File
src/OFArray.m
— part of check-in
[d1a8c88dc6]
at
2023-08-09 08:14:56
on branch trunk
— Add OFSubdata
This replaces the hack of OFAdjacentData being able to keep a pointer to
the parent. (user: js, size: 17579) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
361 362 363 364 365 366 367 | id *buffer; if (range.length > SIZE_MAX - range.location || range.location + range.length < self.count) @throw [OFOutOfRangeException exception]; if (![self isKindOfClass: [OFMutableArray class]]) | > | | 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 | id *buffer; if (range.length > SIZE_MAX - range.location || range.location + range.length < self.count) @throw [OFOutOfRangeException exception]; if (![self isKindOfClass: [OFMutableArray class]]) return [[[OFSubarray alloc] initWithArray: self range: range] autorelease]; buffer = OFAllocMemory(range.length, sizeof(*buffer)); @try { [self getObjects: buffer inRange: range]; ret = [OFArray arrayWithObjects: buffer count: range.length]; } @finally { |
︙ | ︙ |