ObjFW  Diff

Differences From Artifact [3d72b3b75b]:

To Artifact [a92d1baa88]:


838
839
840
841
842
843
844

845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865


866
867
868
869
870
871
872

/* Looking for attribute value */
- (void)of_inAttributeValueState
{
	void *pool;
	OFString *attributeValue;
	size_t length;


	if (_data[_i] != _delimiter)
		return;

	if ((length = _i - _last) > 0)
		appendToBuffer(_buffer, _data + _last, _encoding, length);

	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: _attributeName];

	[_attributes addObject:
	    [OFXMLAttribute attributeWithName: _attributeName
				    namespace: _attributePrefix
				  stringValue: attributeValue]];



	objc_autoreleasePoolPop(pool);

	[_buffer removeAllItems];
	[_attributeName release];
	[_attributePrefix release];
	_attributeName = _attributePrefix = nil;







>

















<
|
|
|
>
>







838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862

863
864
865
866
867
868
869
870
871
872
873
874

/* Looking for attribute value */
- (void)of_inAttributeValueState
{
	void *pool;
	OFString *attributeValue;
	size_t length;
	OFXMLAttribute *attribute;

	if (_data[_i] != _delimiter)
		return;

	if ((length = _i - _last) > 0)
		appendToBuffer(_buffer, _data + _last, _encoding, length);

	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: _attributeName];


	attribute = [OFXMLAttribute attributeWithName: _attributeName
					    namespace: _attributePrefix
					  stringValue: attributeValue];
	attribute->_useDoubleQuotes = (_delimiter == '"');
	[_attributes addObject: attribute];

	objc_autoreleasePoolPop(pool);

	[_buffer removeAllItems];
	[_attributeName release];
	[_attributePrefix release];
	_attributeName = _attributePrefix = nil;