Differences From Artifact [2619682154]:
- File
src/OFXMLParser.m
— part of check-in
[d5ddb2cb48]
at
2012-06-06 13:09:08
on branch trunk
— Rework OFDataArray API.
Also adds more checks. (user: js, size: 25074) [annotate] [blame] [check-ins using] [more...]
To Artifact [c6d94e0ddb]:
- File
src/OFXMLParser.m
— part of check-in
[7a42ee8f11]
at
2012-06-06 17:16:22
on branch trunk
— Rename -[OFXMLParser parseBuffer:withLength:].
It's -[parseBuffer:length:] now. (user: js, size: 25060) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
231 232 233 234 235 236 237 | - (void)setDelegate: (id <OFXMLParserDelegate>)delegate_ { delegate = delegate_; } - (void)parseBuffer: (const char*)buffer | | | 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | - (void)setDelegate: (id <OFXMLParserDelegate>)delegate_ { delegate = delegate_; } - (void)parseBuffer: (const char*)buffer length: (size_t)length { size_t i, last = 0; for (i = 0; i < length; i++) { size_t j = i; lookupTable[state](self, selectors[state], buffer, &i, &last); |
︙ | ︙ | |||
259 260 261 262 263 264 265 | if (length - last > 0 && state != OF_XMLPARSER_IN_TAG) cache_append(cache, buffer + last, encoding, length - last); } - (void)parseString: (OFString*)string { [self parseBuffer: [string UTF8String] | | | | 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 | if (length - last > 0 && state != OF_XMLPARSER_IN_TAG) cache_append(cache, buffer + last, encoding, length - last); } - (void)parseString: (OFString*)string { [self parseBuffer: [string UTF8String] length: [string UTF8StringLength]]; } - (void)parseStream: (OFStream*)stream { char *buffer = [self allocMemoryWithSize: of_pagesize]; @try { while (![stream isAtEndOfStream]) { size_t length = [stream readNBytes: of_pagesize intoBuffer: buffer]; [self parseBuffer: buffer length: length]; } } @finally { [self freeMemory: buffer]; } } - (void)parseFile: (OFString*)path |
︙ | ︙ |