ObjFW  Diff

Differences From Artifact [cf11bcd288]:

To Artifact [4507c3903b]:


99
100
101
102
103
104
105
106

107
108
109
110
111
112
113
114
115
116
117
118
119
120
121

122
123
124
125
126
127
128
99
100
101
102
103
104
105

106









107
108
109
110
111

112
113
114
115
116
117
118
119







-
+
-
-
-
-
-
-
-
-
-





-
+







+ (OFRunLoop*)mainRunLoop
{
	return [[mainRunLoop retain] autorelease];
}

+ (OFRunLoop*)currentRunLoop
{
	OFThread *currentThread = [OFThread currentThread];
	return [[OFThread currentThread] runLoop];
	OFRunLoop *runLoop = [currentThread runLoop];

	if (runLoop != nil)
		return runLoop;

	runLoop = [[[OFRunLoop alloc] init] autorelease];
	[currentThread OF_setRunLoop: runLoop];

	return runLoop;
}

+ (void)OF_setMainRunLoop
{
	void *pool = objc_autoreleasePoolPush();
	mainRunLoop = [[[OFThread currentThread] runLoop] retain];
	mainRunLoop = [[self currentRunLoop] retain];
	objc_autoreleasePoolPop(pool);
}

#ifdef OF_HAVE_BLOCKS
+ (void)OF_addAsyncReadForStream: (OFStream*)stream
			buffer: (void*)buffer
			length: (size_t)length