ObjFW  Diff

Differences From Artifact [0bfaa52216]:

To Artifact [a85051edf1]:


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
171
172
173
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
171
172
173
174







-
+









+
-
+












-
-
+
+








- (void)release
{
}

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

@implementation OFMutableArray
+ (void)initialize
{
	if (self == [OFMutableArray class])
		object_setClass((id)&placeholder,
		placeholder.isa = [OFMutableArray_placeholder class];
		    [OFMutableArray_placeholder class]);
}

+ alloc
{
	if (self == [OFMutableArray class])
		return (id)&placeholder;

	return [super alloc];
}

- init
{
	if (isa == [OFMutableArray class]) {
		Class c = isa;
	if (object_getClass(self) == [OFMutableArray class]) {
		Class c = [self class];
		[self release];
		@throw [OFNotImplementedException exceptionWithClass: c
							    selector: _cmd];
	}

	return [super init];
}
188
189
190
191
192
193
194
195

196
197
198
199
200
201
202
189
190
191
192
193
194
195

196
197
198
199
200
201
202
203







-
+







	[self insertObjectsFromArray: array
			     atIndex: [self count]];
}

- (void)insertObject: (id)object
	     atIndex: (size_t)index
{
	@throw [OFNotImplementedException exceptionWithClass: isa
	@throw [OFNotImplementedException exceptionWithClass: [self class]
						    selector: _cmd];
}

- (void)insertObjectsFromArray: (OFArray*)array
		       atIndex: (size_t)index
{
	OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
214
215
216
217
218
219
220
221

222
223
224
225
226
227
228
215
216
217
218
219
220
221

222
223
224
225
226
227
228
229







-
+








	[pool release];
}

- (void)replaceObjectAtIndex: (size_t)index
		  withObject: (id)object
{
	@throw [OFNotImplementedException exceptionWithClass: isa
	@throw [OFNotImplementedException exceptionWithClass: [self class]
						    selector: _cmd];
}

-    (void)setObject: (id)object
  atIndexedSubscript: (size_t)index
{
	[self replaceObjectAtIndex: index
256
257
258
259
260
261
262
263

264
265
266
267
268
269
270
257
258
259
260
261
262
263

264
265
266
267
268
269
270
271







-
+







			return;
		}
	}
}

- (void)removeObjectAtIndex: (size_t)index
{
	@throw [OFNotImplementedException exceptionWithClass: isa
	@throw [OFNotImplementedException exceptionWithClass: [self class]
						    selector: _cmd];
}

- (void)removeObject: (id)object
{
	size_t i, count = [self count];