ObjFW  Diff

Differences From Artifact [5453c14532]:

To Artifact [0701aeb932]:


32
33
34
35
36
37
38
39

40
41
42
43
44

45
46
47
48
49
50
51
32
33
34
35
36
37
38

39
40
41
42
43

44
45
46
47
48
49
50
51







-
+




-
+







	[OFTLSKey callAllDestructors];
	[OFAutoreleasePool releaseAll];

	return 0;
}

@implementation OFThread
+ threadWithObject: (id)obj
+ threadWithObject: (OFObject <OFCopying>*)obj
{
	return [[[self alloc] initWithObject: obj] autorelease];
}

+ setObject: (id)obj
+ setObject: (OFObject*)obj
  forTLSKey: (OFTLSKey*)key
{
	id old = of_tlskey_get(key->key);

	if (!of_tlskey_set(key->key, [obj retain]))
		@throw [OFInvalidArgumentException newWithClass: self
						       selector: _cmd];
62
63
64
65
66
67
68
69

70
71
72
73
74
75
76
62
63
64
65
66
67
68

69
70
71
72
73
74
75
76







-
+








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

- initWithObject: (id)obj
- initWithObject: (OFObject <OFCopying>*)obj
{
	self = [super init];
	object = [obj copy];

	if (!of_thread_new(&thread, call_main, self)) {
		Class c = isa;
		[object release];