ObjFW  Diff

Differences From Artifact [f4c7729752]:

To Artifact [fdc84a25fe]:


12
13
14
15
16
17
18


19
20
21
22
23
24
25
26
27
28
29
30
31
32
12
13
14
15
16
17
18
19
20
21
22
23
24
25


26
27
28
29
30
31
32







+
+





-
-







 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#include <stdlib.h>

#import "OFSet.h"
#import "OFSet_hashtable.h"
#import "OFString.h"
#import "OFXMLElement.h"

#import "OFNotImplementedException.h"

#import "autorelease.h"

static struct {
	Class isa;
} placeholder;

@interface OFSet_placeholder: OFSet
92
93
94
95
96
97
98
99
100
101





102
103
104
105
106
107
108
92
93
94
95
96
97
98



99
100
101
102
103
104
105
106
107
108
109
110







-
-
-
+
+
+
+
+








- (void)release
{
}

- (void)dealloc
{
	@throw [OFNotImplementedException exceptionWithClass: [self class]
						    selector: _cmd];
	[super dealloc];	/* Get rid of a stupid warning */
	[self doesNotRecognizeSelector: _cmd];
	abort();

	/* Get rid of a stupid warning */
	[super dealloc];
}
@end

@implementation OFSet
+ (void)initialize
{
	if (self == [OFSet class])
151
152
153
154
155
156
157

158
159
160





161

162
163
164
165
166
167
168

169
170
171





172
173
174



175
176

177
178
179
180


















181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207

208
209
210





211

212
213
214
215

216
217
218





219

220
221
222
223
224
225


226
227
228
229
230
231


232
233
234
235
236
237


238
239
240
241
242
243
244
245


246
247
248
249
250
251
252
153
154
155
156
157
158
159
160



161
162
163
164
165

166
167
168
169
170
171
172
173
174



175
176
177
178
179



180
181
182
183
184
185




186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218









219
220
221
222



223
224
225
226
227

228
229
230
231
232
233



234
235
236
237
238

239
240
241
242
243


244
245
246
247
248
249


250
251
252
253
254
255


256
257
258
259
260
261
262
263


264
265
266
267
268
269
270
271
272







+
-
-
-
+
+
+
+
+
-
+







+
-
-
-
+
+
+
+
+
-
-
-
+
+
+


+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+















-
-
-
-
-
-
-
-
-



+
-
-
-
+
+
+
+
+
-
+




+
-
-
-
+
+
+
+
+
-
+




-
-
+
+




-
-
+
+




-
-
+
+






-
-
+
+







	return [[[self alloc] initWithObjects: objects
					count: count] autorelease];
}

- init
{
	if (object_getClass(self) == [OFSet class]) {
		@try {
		Class c = [self class];
		[self release];
		@throw [OFNotImplementedException exceptionWithClass: c
			[self doesNotRecognizeSelector: _cmd];
			abort();
		} @catch (id e) {
			[self release];
			@throw e;
							    selector: _cmd];
		}
	}

	return [super init];
}

- initWithSet: (OFSet*)set
{
	@try {
	Class c = [self class];
	[self release];
	@throw [OFNotImplementedException exceptionWithClass: c
		[self doesNotRecognizeSelector: _cmd];
		abort();
	} @catch (id e) {
		[self release];
		@throw e;
						    selector: _cmd];
}

	}
}

- initWithArray: (OFArray*)array
{
	@try {
	Class c = [self class];
	[self release];
	@throw [OFNotImplementedException exceptionWithClass: c
						    selector: _cmd];
		[self doesNotRecognizeSelector: _cmd];
		abort();
	} @catch (id e) {
		[self release];
		@throw e;
	}
}

- initWithObjects: (id const*)objects
	    count: (size_t)count
{
	@try {
		[self doesNotRecognizeSelector: _cmd];
		abort();
	} @catch (id e) {
		[self release];
		@throw e;
	}
}

- (id)initWithObjects: (id)firstObject, ...
{
	id ret;
	va_list arguments;

	va_start(arguments, firstObject);
	ret = [self initWithObject: firstObject
			 arguments: arguments];
	va_end(arguments);

	return ret;
}

- initWithObjects: (id const*)objects
	    count: (size_t)count
{
	Class c = [self class];
	[self release];
	@throw [OFNotImplementedException exceptionWithClass: c
						    selector: _cmd];
}

- initWithObject: (id)firstObject
       arguments: (va_list)arguments
{
	@try {
	Class c = [self class];
	[self release];
	@throw [OFNotImplementedException exceptionWithClass: c
		[self doesNotRecognizeSelector: _cmd];
		abort();
	} @catch (id e) {
		[self release];
		@throw e;
						    selector: _cmd];
	}
}

- initWithSerialization: (OFXMLElement*)element
{
	@try {
	Class c = [self class];
	[self release];
	@throw [OFNotImplementedException exceptionWithClass: c
		[self doesNotRecognizeSelector: _cmd];
		abort();
	} @catch (id e) {
		[self release];
		@throw e;
						    selector: _cmd];
	}
}

- (size_t)count
{
	@throw [OFNotImplementedException exceptionWithClass: [self class]
						    selector: _cmd];
	[self doesNotRecognizeSelector: _cmd];
	abort();
}

- (BOOL)containsObject: (id)object
{
	@throw [OFNotImplementedException exceptionWithClass: [self class]
						    selector: _cmd];
	[self doesNotRecognizeSelector: _cmd];
	abort();
}

- (OFEnumerator*)objectEnumerator
{
	@throw [OFNotImplementedException exceptionWithClass: [self class]
						    selector: _cmd];
	[self doesNotRecognizeSelector: _cmd];
	abort();
}

- (int)countByEnumeratingWithState: (of_fast_enumeration_state_t*)state
			   objects: (id*)objects
			     count: (int)count
{
	@throw [OFNotImplementedException exceptionWithClass: [self class]
						    selector: _cmd];
	[self doesNotRecognizeSelector: _cmd];
	abort();
}

- (BOOL)isEqual: (id)object
{
	OFSet *otherSet;

	if (![object isKindOfClass: [OFSet class]])