Differences From Artifact [8741247447]:
- File
src/OFXMLParser.m
— part of check-in
[e1e7ffa903]
at
2011-09-22 23:25:42
on branch trunk
— Exceptions are now autoreleased.
This is safe as an "exception loop" can't happen, since if allocating
an exception fails, it throws an OFAllocFailedException which is
preallocated and can always be thrown.So, the worst case would be that an autorelease of an exception fails,
triggering an OFOutOfMemoryException for which there is no memory,
resulting in an OFAllocFailedException to be thrown. (user: js, size: 25324) [annotate] [blame] [check-ins using]
To Artifact [7b02ea3041]:
- File src/OFXMLParser.m — part of check-in [8523d20555] at 2011-10-11 22:13:23 on branch trunk — Small optimization in OFXMLParser. (user: js, size: 25215) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
62 63 64 65 66 67 68 | static OFString* transform_string(OFDataArray *cache, size_t cut, BOOL unescape, OFObject <OFStringXMLUnescapingDelegate> *delegate) { OFMutableString *ret = [OFMutableString stringWithUTF8String: [cache cArray] | | < < < < < < | 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | static OFString* transform_string(OFDataArray *cache, size_t cut, BOOL unescape, OFObject <OFStringXMLUnescapingDelegate> *delegate) { OFMutableString *ret = [OFMutableString stringWithUTF8String: [cache cArray] length: [cache count] - cut]; [ret replaceOccurrencesOfString: @"\r\n" withString: @"\n"]; [ret replaceOccurrencesOfString: @"\r" withString: @"\n"]; if (unescape) return [ret stringByXMLUnescapingWithDelegate: delegate]; [ret makeImmutable]; return ret; } |
︙ | ︙ |