ObjFW  Diff

Differences From Artifact [d6054ff862]:

To Artifact [da02b5a0e1]:


22
23
24
25
26
27
28

29
30
31
32
33
34
35
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36







+








#include <assert.h>

#include <sys/time.h>

#import "OFObject.h"
#import "OFArray.h"
#import "OFSystemInfo.h"
#import "OFTimer.h"
#import "OFRunLoop.h"
#import "OFThread.h"

#import "OFAllocFailedException.h"
#import "OFEnumerationMutationException.h"
#import "OFInitializationFailedException.h"
95
96
97
98
99
100
101

102
103
104

105
106
107
108
109
110
111
112

113
114
115
116
117
118
119
96
97
98
99
100
101
102
103
104
105

106
107
108
109
110
111
112
113

114
115
116
117
118
119
120
121







+


-
+







-
+








#if !defined(OF_APPLE_RUNTIME) || defined(__OBJC2__)
static void
uncaughtExceptionHandler(id exception)
{
	OFString *description = [exception description];
	OFArray *backtrace = nil;
	of_string_encoding_t encoding = [OFSystemInfo native8BitEncoding];

	fprintf(stderr, "\nRuntime error: Unhandled exception:\n%s\n",
	    [description cStringWithEncoding: [OFString nativeOSEncoding]]);
	    [description cStringWithEncoding: encoding]);

	if ([exception respondsToSelector: @selector(backtrace)])
		backtrace = [exception backtrace];

	if (backtrace != nil) {
		OFString *s = [backtrace componentsJoinedByString: @"\n  "];
		fprintf(stderr, "\nBacktrace:\n  %s\n\n",
		    [s cStringWithEncoding: [OFString nativeOSEncoding]]);
		    [s cStringWithEncoding: encoding]);
	}

	abort();
}
#endif

static void
198
199
200
201
202
203
204
205

206
207
208
209
210
211
212
200
201
202
203
204
205
206

207
208
209
210
211
212
213
214







-
+







	return instance;
}

const char*
_NSPrintForDebugger(id object)
{
	return [[object description]
	    cStringWithEncoding: [OFString nativeOSEncoding]];
	    cStringWithEncoding: [OFSystemInfo native8BitEncoding]];
}

/* References for static linking */
void _references_to_categories_of_OFObject(void)
{
	_OFObject_Serialization_reference = 1;
}