Differences From Artifact [e91c2714f2]:
- File src/OFXMLParser.m — part of check-in [4b637f8516] at 2012-12-26 14:10:34 on branch trunk — Add OFSystemInfo. (user: js, size: 25486) [annotate] [blame] [check-ins using]
To Artifact [6860431168]:
- File
src/OFXMLParser.m
— part of check-in
[036c487137]
at
2012-12-29 14:29:23
on branch trunk
— OFXMLParser: OFMutableString -> OFString.
There was no point in having it mutable here. (user: js, size: 25449) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
62 63 64 65 66 67 68 | static OFString* transform_string(OFDataArray *cache, size_t cut, BOOL unescape, id <OFStringXMLUnescapingDelegate> delegate) { char *items; size_t i, length; BOOL hasEntities = NO; | | | | < < | 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | static OFString* transform_string(OFDataArray *cache, size_t cut, BOOL unescape, id <OFStringXMLUnescapingDelegate> delegate) { char *items; size_t i, length; BOOL hasEntities = NO; OFString *ret; items = [cache items]; length = [cache count] - cut; for (i = 0; i < length; i++) { if (items[i] == '\r') { if (i + 1 < length && items[i + 1] == '\n') { [cache removeItemAtIndex: i]; items = [cache items]; i--; length--; } else items[i] = '\n'; } else if (items[i] == '&') hasEntities = YES; } ret = [OFString stringWithUTF8String: items length: length]; if (unescape && hasEntities) return [ret stringByXMLUnescapingWithDelegate: delegate]; return ret; } static OFString* namespace_for_prefix(OFString *prefix, OFArray *namespaces) { OFDictionary **objects = [namespaces objects]; |
︙ | ︙ |