Differences From Artifact [ce913f08f5]:
- File src/OFArray.m — part of check-in [d6faaf68b9] at 2011-07-22 17:09:56 on branch trunk — Rename -[reduceUsingBlock:] to -[foldUsingBlock:]. (user: js, size: 13601) [annotate] [blame] [check-ins using]
To Artifact [1f143f64a7]:
- File
src/OFArray.m
— part of check-in
[bfb7745f95]
at
2011-07-28 20:50:09
on branch trunk
— Don't create and release a pool in -[enumerateObjectsUsingBlock:].
This would make it impossible to use autoreleased objects after the
block has been executed without manually retaining and releasing them. (user: js, size: 13492) [annotate] [blame] [check-ins using]
| ︙ | ︙ | |||
578 579 580 581 582 583 584 |
dataArray: array
mutationsPointer: NULL] autorelease];
}
#ifdef OF_HAVE_BLOCKS
- (void)enumerateObjectsUsingBlock: (of_array_enumeration_block_t)block
{
| < | < < < < | 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 |
dataArray: array
mutationsPointer: NULL] autorelease];
}
#ifdef OF_HAVE_BLOCKS
- (void)enumerateObjectsUsingBlock: (of_array_enumeration_block_t)block
{
id *cArray = [array cArray];
size_t i, count = [array count];
BOOL stop = NO;
for (i = 0; i < count && !stop; i++)
block(cArray[i], i, &stop);
}
- (OFArray*)mappedArrayUsingBlock: (of_array_map_block_t)block
{
OFArray *ret;
size_t count = [array count];
id *tmp = [self allocMemoryForNItems: count
|
| ︙ | ︙ |