ObjFW  Diff

Differences From Artifact [bc6ad5b4e9]:

To Artifact [a2a5089265]:


60
61
62
63
64
65
66
67

68
69
70
71
72
73
74
60
61
62
63
64
65
66

67
68
69
70
71
72
73
74







-
+







	OF_BLOCK_FIELD_IS_BLOCK	 =   7,
	OF_BLOCK_FIELD_IS_BYREF	 =   8,
	OF_BLOCK_FIELD_IS_WEAK	 =  16,
	OF_BLOCK_BYREF_CALLER	 = 128
};

@protocol RetainRelease
- retain;
- (instancetype)retain;
- (void)release;
@end

#ifdef OF_OBJFW_RUNTIME
/* Begin of ObjC module */
static struct objc_abi_class _NSConcreteStackBlock_metaclass = {
	(struct objc_abi_class *)(void *)"OFBlock", "OFBlock", "OFStackBlock",
421
422
423
424
425
426
427
428

429
430
431
432
433

434
435
436
437
438
439
440
421
422
423
424
425
426
427

428
429
430
431
432

433
434
435
436
437
438
439
440







-
+




-
+







	memcpy(&_NSConcreteMallocBlock, tmp, sizeof(_NSConcreteMallocBlock));
	free(tmp);
	objc_registerClassPair((Class)&_NSConcreteMallocBlock);
# endif
#endif
}

+ alloc
+ (instancetype)alloc
{
	OF_UNRECOGNIZED_SELECTOR
}

- init
- (instancetype)init
{
	OF_INVALID_INIT_METHOD
}

- (void *)allocMemoryWithSize: (size_t)size
{
	OF_UNRECOGNIZED_SELECTOR
460
461
462
463
464
465
466
467

468
469
470
471
472
473
474
475

476
477
478
479
480

481
482
483
484
485
486
487
460
461
462
463
464
465
466

467
468
469
470
471
472
473
474

475
476
477
478
479

480
481
482
483
484
485
486
487







-
+







-
+




-
+







}

- (void)freeMemory: (void *)ptr
{
	OF_UNRECOGNIZED_SELECTOR
}

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

	return self;
}

- copy
- (id)copy
{
	return Block_copy(self);
}

- autorelease
- (instancetype)autorelease
{
	if (object_getClass(self) == (Class)&_NSConcreteMallocBlock)
		return [super autorelease];

	return self;
}