ObjFW  Diff

Differences From Artifact [2e27de79cd]:

  • File src/OFXMLElement.m — part of check-in [21bd46e17a] at 2011-05-14 20:00:48 on branch 0.5 — Fix namespace handling in OFXMLElement.

    Although it was originally decided not to backport this to 0.5, the
    decision was changed due to the fact that the initial assumption that
    it might break existing code is only partially true: It will only break
    code that already was broken, but it will fix all other code. (user: js, size: 16988) [annotate] [blame] [check-ins using]

To Artifact [b89fa67593]:


754
755
756
757
758
759
760



































761
762
763
764
765
766
767
			if (children_c[i]->ns == nil &&
			    [children_c[i]->name isEqual: elemname])
				[ret addObject: children_c[i]];
	}

	return ret;
}




































- (void)dealloc
{
	[name release];
	[ns release];
	[defaultNamespace release];
	[attributes release];







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
			if (children_c[i]->ns == nil &&
			    [children_c[i]->name isEqual: elemname])
				[ret addObject: children_c[i]];
	}

	return ret;
}

- (BOOL)isEqual: (id)object
{
	OFXMLElement *other;

	if (![object isKindOfClass: [OFXMLElement class]])
		return NO;

	other = object;

	if (other->name != name && ![other->name isEqual: name])
		return NO;
	if (other->ns != ns && ![other->ns isEqual: ns])
		return NO;
	if (other->defaultNamespace != defaultNamespace &&
	    ![other->defaultNamespace isEqual: defaultNamespace])
		return NO;
	if (other->attributes != attributes &&
	    ![other->attributes isEqual: attributes])
		return NO;
	if (other->namespaces != namespaces &&
	    ![other->namespaces isEqual: namespaces])
		return NO;
	if (other->children != children && ![other->children isEqual: children])
		return NO;
	if (other->characters != characters &&
	    ![other->characters isEqual: characters])
		return NO;
	if (other->cdata != cdata && ![other->cdata isEqual: cdata])
		return NO;
	if (other->comment != comment && ![other->comment isEqual: comment])
		return NO;

	return YES;
}

- (void)dealloc
{
	[name release];
	[ns release];
	[defaultNamespace release];
	[attributes release];