ObjFW  Diff

Differences From Artifact [6f60ff9dfc]:

To Artifact [ef2b5b53fe]:


90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
90
91
92
93
94
95
96





97
98
99
100
101
102
103







-
-
-
-
-








static SEL cxx_construct = NULL;
static SEL cxx_destruct = NULL;

size_t of_pagesize;
size_t of_num_cpus;

#ifdef OF_OBJFW_RUNTIME
extern BOOL objc_sync_init();
extern BOOL objc_properties_init();
#endif

#if !defined(OF_APPLE_RUNTIME) || defined(__OBJC2__)
static void
uncaught_exception_handler(id exception)
{
	fprintf(stderr, "\nRuntime error: Unhandled exception:\n%s\n",
	    [[exception description] UTF8String]);
}
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
227
228
229
230
231
232
233













234
235
236
237
238
239
240







-
-
-
-
-
-
-
-
-
-
-
-
-







{
	_OFObject_Serialization_reference = 1;
}

@implementation OFObject
+ (void)load
{
#ifdef OF_OBJFW_RUNTIME
	if (!objc_sync_init()) {
		fputs("Runtime error: objc_sync_init() failed!\n", stderr);
		abort();
	}

	if (!objc_properties_init()) {
		fputs("Runtime error: objc_properties_init() failed!\n",
		    stderr);
		abort();
	}
#endif

#if !defined(OF_APPLE_RUNTIME) || defined(__OBJC2__)
	objc_setUncaughtExceptionHandler(uncaught_exception_handler);
#endif

#ifdef OF_OBJFW_RUNTIME
	objc_forward_handler = forward_handler;
#endif