ObjFW  Diff

Differences From Artifact [e7f8997037]:

To Artifact [84017da3fd]:


311
312
313
314
315
316
317
318
319
320










321
322
323

324
325
326
327
328
329
330
311
312
313
314
315
316
317

318
319
320
321
322
323
324
325
326
327
328
329
330
331

332
333
334
335
336
337
338
339







-


+
+
+
+
+
+
+
+
+
+


-
+







			free(obj);
		}
		break;
	}
}

@implementation OFBlock
#ifdef OF_APPLE_RUNTIME
+ (void)load
{
#ifndef OF_HAVE_ATOMIC_OPS
	size_t i;

	for (i = 0; i < NUM_SPINLOCKS; i++)
		if (!of_spinlock_new(&spinlocks[i]))
			@throw [OFInitializationFailedException
			    exceptionWithClass: self];
#endif

#ifdef OF_APPLE_RUNTIME
	Class tmp;

#ifdef __OBJC2__
# ifdef __OBJC2__
	tmp = objc_initializeClassPair(self, "OFStackBlock",
	    (Class)&_NSConcreteStackBlock,
	    (Class)&_NSConcreteStackBlock_metaclass);
	if (tmp == Nil)
		@throw [OFInitializationFailedException
		    exceptionWithClass: self];
	objc_registerClassPair(tmp);
368
369
370
371
372
373
374
375
376
377

378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
377
378
379
380
381
382
383

384

385











386
387
388
389
390
391
392







-

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







	if ((tmp = objc_allocateClassPair(self, "OFMallocBlock", 0)) == NULL)
		@throw [OFInitializationFailedException
		    exceptionWithClass: self];
	memcpy(&_NSConcreteMallocBlock, tmp, sizeof(_NSConcreteMallocBlock));
	free(tmp);
	objc_registerClassPair((Class)&_NSConcreteMallocBlock);
# endif
}
#endif

}
#ifndef OF_HAVE_ATOMIC_OPS
+ (void)initialize
{
	size_t i;

	for (i = 0; i < NUM_SPINLOCKS; i++)
		if (!of_spinlock_new(&spinlocks[i]))
			@throw [OFInitializationFailedException
			    exceptionWithClass: self];
}
#endif

+ alloc
{
	[self doesNotRecognizeSelector: _cmd];
	abort();
}