Differences From Artifact [f763218ad7]:
- File src/OFXMLParser.m — part of check-in [e7801f415e] at 2010-07-03 17:15:13 on branch trunk — Skip over the prolog in OFXMLParser. Will be parsed someday. (user: js, size: 15827) [annotate] [blame] [check-ins using]
To Artifact [bc650a7105]:
- File
src/OFXMLParser.m
— part of check-in
[d4b379485a]
at
2010-07-08 08:57:00
on branch trunk
— Don't retain + autorelease objects returned from collections.
This increases performance and should not need to be handled by the
programmer in most cases. (user: js, size: 15829) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
207 208 209 210 211 212 213 | name = [cache copy]; prefix = nil; } if (buf[i] == '>' || buf[i] == '/') { OFString *ns; | < > > | 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 | name = [cache copy]; prefix = nil; } if (buf[i] == '>' || buf[i] == '/') { OFString *ns; ns = namespace_for_prefix(prefix, namespaces); if (prefix != nil && ns == nil) @throw [OFUnboundNamespaceException newWithClass: isa prefix: prefix]; pool = [[OFAutoreleasePool alloc] init]; [delegate parser: self didStartElement: name withPrefix: prefix namespace: ns attributes: nil]; |
︙ | ︙ | |||
293 294 295 296 297 298 299 | if (![[previous lastObject] isEqual: cache]) @throw [OFMalformedXMLException newWithClass: isa]; [previous removeNObjects: 1]; [cache setToCString: ""]; | < < | > > < > > | 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 | if (![[previous lastObject] isEqual: cache]) @throw [OFMalformedXMLException newWithClass: isa]; [previous removeNObjects: 1]; [cache setToCString: ""]; ns = namespace_for_prefix(prefix, namespaces); if (prefix != nil && ns == nil) @throw [OFUnboundNamespaceException newWithClass: isa prefix: prefix]; pool = [[OFAutoreleasePool alloc] init]; [delegate parser: self didEndElement: name withPrefix: prefix namespace: ns]; [pool release]; [namespaces removeNObjects: 1]; [name release]; [prefix release]; name = prefix = nil; last = i + 1; state = (buf[i] == '>' ? OF_XMLPARSER_OUTSIDE_TAG : OF_XMLPARSER_EXPECT_SPACE_OR_CLOSE); } break; /* Inside a tag, name found */ case OF_XMLPARSER_IN_TAG: if (buf[i] == '>' || buf[i] == '/') { OFString *ns; ns = namespace_for_prefix(prefix, namespaces); if (prefix != nil && ns == nil) @throw [OFUnboundNamespaceException newWithClass: isa prefix: prefix]; pool = [[OFAutoreleasePool alloc] init]; [delegate parser: self didStartElement: name withPrefix: prefix namespace: ns attributes: attrs]; |
︙ | ︙ |