ObjFW  Diff

Differences From Artifact [daa6113db1]:

To Artifact [e3fe4dcc30]:


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
		break;
	}
}
#endif

/// \cond internal
@implementation OFBlock





+ (void)initialize

{


}






+ (Class)class

{





































	return self;
}

- copy
{
	return Block_copy(self);
}









- (void)release
{
	Block_release(self);
}







@end

#if !defined(OF_GNU_RUNTIME) && !defined(OF_OBJFW_RUNTIME)
@implementation OFStackBlock
@end

@implementation OFGlobalBlock
@end

@implementation OFMallocBlock
@end
#endif
/// \endcond







>
>
>
>
>
|
>

>
>


>
>
>
>
>
|
>

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







>
>
>
>
>
>
>
>





>
>
>
>
>
>
>













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
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
		break;
	}
}
#endif

/// \cond internal
@implementation OFBlock
+ alloc
{
	@throw [OFNotImplementedException newWithClass: self
					      selector: _cmd];
}

- init
{
	@throw [OFNotImplementedException newWithClass: isa
					      selector: _cmd];
}

- (void)addMemoryToPool: (void*)ptr
{
	@throw [OFNotImplementedException newWithClass: isa
					      selector: _cmd];
}

- (void*)allocMemoryWithSize: (size_t)size
{
	@throw [OFNotImplementedException newWithClass: isa
					      selector: _cmd];
}

- (void*)allocMemoryForNItems: (size_t)nitems
                     withSize: (size_t)size
{
	@throw [OFNotImplementedException newWithClass: isa
					      selector: _cmd];
}

- (void*)resizeMemory: (void*)ptr
               toSize: (size_t)size
{
	@throw [OFNotImplementedException newWithClass: isa
					      selector: _cmd];
}

- (void*)resizeMemory: (void*)ptr
	     toNItems: (size_t)nitems
	     withSize: (size_t)size
{
	@throw [OFNotImplementedException newWithClass: isa
					      selector: _cmd];
}

- (void)freeMemory: (void*)ptr
{
	@throw [OFNotImplementedException newWithClass: isa
					      selector: _cmd];
}

- retain
{
	if (isa == (Class)&_NSConcreteMallocBlock)
		return Block_copy(self);

	return self;
}

- copy
{
	return Block_copy(self);
}

- (size_t)retainCount
{
	if (isa == (Class)&_NSConcreteMallocBlock)
		return ((of_block_literal_t*)self)->reserved;

	return SIZE_MAX;
}

- (void)release
{
	Block_release(self);
}

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

#if !defined(OF_GNU_RUNTIME) && !defined(OF_OBJFW_RUNTIME)
@implementation OFStackBlock
@end

@implementation OFGlobalBlock
@end

@implementation OFMallocBlock
@end
#endif
/// \endcond