Overview
| Comment: | Small string optimization. |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
50a6d34eff04c19a1f8cc7aebf9a0905 |
| User & Date: | js on 2011-04-27 16:14:39 |
| Other Links: | manifest | tags |
Context
|
2011-04-27
| ||
| 21:29 | Fix a typo in -[description] of OFConnectionFailedException. (check-in: ffb574eb74 user: js tags: trunk) | |
| 16:14 | Small string optimization. (check-in: 50a6d34eff user: js tags: trunk) | |
|
2011-04-25
| ||
| 22:54 | Actually, it's called charset in the header, not encoding. (check-in: 7d29241068 user: js tags: trunk) | |
Changes
Modified src/OFString.m from [ac1b639bcb] to [e3d5101e79].
| ︙ | ︙ | |||
766 767 768 769 770 771 772 773 774 775 776 777 778 779 |
{
return string;
}
- (size_t)length
{
/* FIXME: Maybe cache this in an ivar? */
return of_string_position_to_index(string, length);
}
- (size_t)cStringLength
{
return length;
| > > > | 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 |
{
return string;
}
- (size_t)length
{
/* FIXME: Maybe cache this in an ivar? */
if (![self isUTF8])
return length;
return of_string_position_to_index(string, length);
}
- (size_t)cStringLength
{
return length;
|
| ︙ | ︙ |
Modified src/OFXMLParser.m from [852bd85a55] to [b060def371].
| ︙ | ︙ | |||
46 47 48 49 50 51 52 |
{
[cache replaceOccurrencesOfString: @"\r\n"
withString: @"\n"];
[cache replaceOccurrencesOfString: @"\r"
withString: @"\n"];
if (cut > 0) {
| < < < < < < | < | | | < < < < < < < < < < < < | | < | | < | 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
{
[cache replaceOccurrencesOfString: @"\r\n"
withString: @"\n"];
[cache replaceOccurrencesOfString: @"\r"
withString: @"\n"];
if (cut > 0) {
size_t length = [cache length];
[cache deleteCharactersFromIndex: length - cut
toIndex: length];
}
if (unescape)
return [cache stringByXMLUnescapingWithDelegate: delegate];
else
return [[cache copy] autorelease];
}
static OFString*
namespace_for_prefix(OFString *prefix, OFArray *namespaces)
{
OFDictionary **cArray = [namespaces cArray];
ssize_t i;
|
| ︙ | ︙ |