ObjFW  Diff

Differences From Artifact [fee37530e3]:

To Artifact [9e62f802e4]:


1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
		i += cStringLength - 1;
		last = i + 1;
	}
	[array addObject: [OFString stringWithCString: s->cString + last]];

	[pool release];

	/*
	 * Class swizzle the array to be immutable. We declared the return type
	 * to be OFArray*, so it can't be modified anyway. But not swizzling it
	 * would create a real copy each time -[copy] is called.
	 */
	array->isa = [OFArray class];
	return array;
}

- (OFArray*)pathComponents
{
	OFMutableArray *ret;
	OFAutoreleasePool *pool;
	size_t i, last = 0, pathCStringLength = s->cStringLength;







<
<
<
<
<
<
|







1579
1580
1581
1582
1583
1584
1585






1586
1587
1588
1589
1590
1591
1592
1593
		i += cStringLength - 1;
		last = i + 1;
	}
	[array addObject: [OFString stringWithCString: s->cString + last]];

	[pool release];







	return [array makeImmutable];
}

- (OFArray*)pathComponents
{
	OFMutableArray *ret;
	OFAutoreleasePool *pool;
	size_t i, last = 0, pathCStringLength = s->cStringLength;
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
	}

	[ret addObject: [OFString stringWithCString: s->cString + last
					     length: i - last]];

	[pool release];

	/*
	 * Class swizzle the array to be immutable. We declared the return type
	 * to be OFArray*, so it can't be modified anyway. But not swizzling it
	 * would create a real copy each time -[copy] is called.
	 */
	ret->isa = [OFArray class];
	return ret;
}

- (OFString*)lastPathComponent
{
	size_t pathCStringLength = s->cStringLength;
	ssize_t i;








<
<
<
<
<
<
|







1621
1622
1623
1624
1625
1626
1627






1628
1629
1630
1631
1632
1633
1634
1635
	}

	[ret addObject: [OFString stringWithCString: s->cString + last
					     length: i - last]];

	[pool release];







	return [ret makeImmutable];
}

- (OFString*)lastPathComponent
{
	size_t pathCStringLength = s->cStringLength;
	ssize_t i;