ObjFW  Diff

Differences From Artifact [9b8cdb5bf4]:

To Artifact [b19418ed62]:


14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
 * file.
 */

#include "config.h"

#include <string.h>

#include <sys/types.h>

#import "OFXMLParser.h"
#import "OFString.h"
#import "OFArray.h"
#import "OFDictionary.h"
#import "OFBigDataArray.h"
#import "OFXMLAttribute.h"
#import "OFStream.h"







<
<







14
15
16
17
18
19
20


21
22
23
24
25
26
27
 * file.
 */

#include "config.h"

#include <string.h>



#import "OFXMLParser.h"
#import "OFString.h"
#import "OFArray.h"
#import "OFDictionary.h"
#import "OFBigDataArray.h"
#import "OFXMLAttribute.h"
#import "OFStream.h"
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
{
	OFDictionary *const *objects = [namespaces objects];
	size_t count = [namespaces count];

	if (prefix == nil)
		prefix = @"";

	if (count - 1 > SSIZE_MAX)
		@throw [OFOutOfRangeException exception];

	for (ssize_t i = count - 1; i >= 0; i--) {
		OFString *tmp;

		if ((tmp = [objects[i] objectForKey: prefix]) != nil)
			return tmp;
	}

	return nil;
}

static OF_INLINE void







|
<
<
<


|







101
102
103
104
105
106
107
108



109
110
111
112
113
114
115
116
117
118
{
	OFDictionary *const *objects = [namespaces objects];
	size_t count = [namespaces count];

	if (prefix == nil)
		prefix = @"";

	while (count > 0) {



		OFString *tmp;

		if ((tmp = [objects[--count] objectForKey: prefix]) != nil)
			return tmp;
	}

	return nil;
}

static OF_INLINE void