Differences From Artifact [913f851c54]:
- File
src/OFXMLParser.m
— part of check-in
[23e57c5040]
at
2017-07-22 23:04:35
on branch trunk
— OFFile: Simplify mode
This removes "b" for binary and always uses binary, as there is no good
reason to not use binary. (user: js, size: 23892) [annotate] [blame] [check-ins using] [more...]
To Artifact [8522ee412a]:
- File src/OFXMLParser.m — part of check-in [2de9660312] at 2017-09-28 23:02:23 on branch trunk — Enable -Wnullable-to-nonnull-conversion and adjust (user: js, size: 24025) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
543 544 545 546 547 548 549 | if (_data[_i] == '>' || _data[_i] == '/') { OFString *namespace; namespace = namespaceForPrefix(_prefix, _namespaces); if (_prefix != nil && namespace == nil) @throw [OFUnboundPrefixException | | | | | 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 | if (_data[_i] == '>' || _data[_i] == '/') { OFString *namespace; namespace = namespaceForPrefix(_prefix, _namespaces); if (_prefix != nil && namespace == nil) @throw [OFUnboundPrefixException exceptionWithPrefix: (OFString *)_prefix parser: self]; if ([_delegate respondsToSelector: @selector(parser: didStartElement:prefix:namespace:attributes:)]) [_delegate parser: self didStartElement: (OFString *)_name prefix: _prefix namespace: namespace attributes: nil]; if (_data[_i] == '/') { if ([_delegate respondsToSelector: @selector(parser:didEndElement:prefix:namespace:)]) [_delegate parser: self didEndElement: (OFString *)_name prefix: _prefix namespace: namespace]; if ([_previous count] == 0) _finishedParsing = true; } else [_previous addObject: bufferString]; |
︙ | ︙ | |||
630 631 632 633 634 635 636 | [_previous removeLastObject]; [_buffer removeAllItems]; namespace = namespaceForPrefix(_prefix, _namespaces); if (_prefix != nil && namespace == nil) | | > | | | 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 | [_previous removeLastObject]; [_buffer removeAllItems]; namespace = namespaceForPrefix(_prefix, _namespaces); if (_prefix != nil && namespace == nil) @throw [OFUnboundPrefixException exceptionWithPrefix: (OFString *)_prefix parser: self]; if ([_delegate respondsToSelector: @selector(parser:didEndElement:prefix:namespace:)]) [_delegate parser: self didEndElement: (OFString *)_name prefix: _prefix namespace: namespace]; objc_autoreleasePoolPop(pool); [_namespaces removeLastObject]; [_name release]; |
︙ | ︙ | |||
681 682 683 684 685 686 687 | attributesObjects = [_attributes objects]; attributesCount = [_attributes count]; namespace = namespaceForPrefix(_prefix, _namespaces); if (_prefix != nil && namespace == nil) | | > | | | | | 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 | attributesObjects = [_attributes objects]; attributesCount = [_attributes count]; namespace = namespaceForPrefix(_prefix, _namespaces); if (_prefix != nil && namespace == nil) @throw [OFUnboundPrefixException exceptionWithPrefix: (OFString *)_prefix parser: self]; for (size_t j = 0; j < attributesCount; j++) resolveAttributeNamespace(attributesObjects[j], _namespaces, self); pool = objc_autoreleasePoolPush(); if ([_delegate respondsToSelector: @selector(parser:didStartElement:prefix:namespace:attributes:)]) [_delegate parser: self didStartElement: (OFString *)_name prefix: _prefix namespace: namespace attributes: _attributes]; if (_data[_i] == '/') { if ([_delegate respondsToSelector: @selector(parser:didEndElement:prefix:namespace:)]) [_delegate parser: self didEndElement: (OFString *)_name prefix: _prefix namespace: namespace]; if ([_previous count] == 0) _finishedParsing = true; [_namespaces removeLastObject]; } else if (_prefix != nil) { OFString *str = [OFString stringWithFormat: @"%@:%@", _prefix, _name]; [_previous addObject: str]; } else [_previous addObject: (OFString *)_name]; objc_autoreleasePoolPop(pool); [_name release]; [_prefix release]; [_attributes removeAllObjects]; _name = _prefix = nil; |
︙ | ︙ | |||
826 827 828 829 830 831 832 | pool = objc_autoreleasePoolPush(); attributeValue = transformString(self, _buffer, 0, true); if (_attributePrefix == nil && [_attributeName isEqual: @"xmlns"]) [[_namespaces lastObject] setObject: attributeValue forKey: @""]; if ([_attributePrefix isEqual: @"xmlns"]) | | > | | | 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 | pool = objc_autoreleasePoolPush(); attributeValue = transformString(self, _buffer, 0, true); if (_attributePrefix == nil && [_attributeName isEqual: @"xmlns"]) [[_namespaces lastObject] setObject: attributeValue forKey: @""]; if ([_attributePrefix isEqual: @"xmlns"]) [[_namespaces lastObject] setObject: attributeValue forKey: (OFString *)_attributeName]; [_attributes addObject: [OFXMLAttribute attributeWithName: (OFString *)_attributeName namespace: _attributePrefix stringValue: attributeValue]]; objc_autoreleasePoolPop(pool); [_buffer removeAllItems]; [_attributeName release]; |
︙ | ︙ |