ObjFW  Diff

Differences From Artifact [1d13a2237c]:

To Artifact [9fef639632]:


112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162






163

164
165
166
167
168
169
170
	return self;
}

- initWithText: (OFString*)text_
{
	self = [super init];

	@try {
		OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
		text = [[text_ stringByXMLEscaping] retain];
		[pool release];
	} @catch (OFException *e) {
		[self dealloc];
		@throw e;
	}

	return self;
}

- initWithComment: (OFString*)comment_
{
	self = [super init];

	@try {
		comment = [[OFMutableString alloc] initWithString: @"<!--"];
		[comment appendString: comment_];
		[comment appendString: @"-->"];
	} @catch (OFException *e) {
		[self dealloc];
		@throw e;
	}

	return self;
}

- (OFString*)_stringWithParentNamespaces: (OFDictionary*)parent_namespaces
		  parentDefaultNamespace: (OFString*)parent_default_ns
{
	OFAutoreleasePool *pool, *pool2;
	char *str_c;
	size_t len, i, j, attrs_count;
	OFString *prefix = nil;
	OFXMLAttribute **attrs_carray;
	OFString *ret, *tmp;
	OFMutableDictionary *all_namespaces;
	OFString *def_ns;

	if (text != nil)
		return [[text retain] autorelease];

	if (comment != nil)






		return [[comment retain] autorelease];


	pool = [[OFAutoreleasePool alloc] init];
	def_ns = (defaultNamespace != nil
	    ? defaultNamespace : parent_default_ns);

	if (parent_namespaces != nil) {
		OFEnumerator *key_enum = [namespaces keyEnumerator];







<
<
|
<
<
<
<
<








<
<
<
|
<
<
<
<

















|

|
>
>
>
>
>
>
|
>







112
113
114
115
116
117
118


119





120
121
122
123
124
125
126
127



128




129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
	return self;
}

- initWithText: (OFString*)text_
{
	self = [super init];



	text = [text_ copy];






	return self;
}

- initWithComment: (OFString*)comment_
{
	self = [super init];




	comment = [comment_ copy];





	return self;
}

- (OFString*)_stringWithParentNamespaces: (OFDictionary*)parent_namespaces
		  parentDefaultNamespace: (OFString*)parent_default_ns
{
	OFAutoreleasePool *pool, *pool2;
	char *str_c;
	size_t len, i, j, attrs_count;
	OFString *prefix = nil;
	OFXMLAttribute **attrs_carray;
	OFString *ret, *tmp;
	OFMutableDictionary *all_namespaces;
	OFString *def_ns;

	if (text != nil)
		return [text stringByXMLEscaping];

	if (comment != nil) {
		OFMutableString *str;

		str = [OFMutableString stringWithString: @"<!--"];
		[str appendString: comment];
		[str appendString: @"-->"];

		return str;
	}

	pool = [[OFAutoreleasePool alloc] init];
	def_ns = (defaultNamespace != nil
	    ? defaultNamespace : parent_default_ns);

	if (parent_namespaces != nil) {
		OFEnumerator *key_enum = [namespaces keyEnumerator];