ObjFW  Diff

Differences From Artifact [eb397d13f9]:

To Artifact [9b40b1e63a]:


114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
#endif
	}

	objects = [readStreams objects];
	count = [readStreams count];

	for (i = 0; i < count; i++) {
		int fileDescriptor = [objects[i] fileDescriptor];

		pool = objc_autoreleasePoolPush();

		if (FD_ISSET(fileDescriptor, &readFDs_)) {
			realEvents++;
			[delegate streamIsReadyForReading: objects[i]];
		}

		if (FD_ISSET(fileDescriptor, &exceptFDs_)) {
			realEvents++;
			[delegate streamDidReceiveException: objects[i]];

			/*
			 * Prevent calling it twice in case the FD is in both
			 * sets.
			 */
			FD_CLR(fileDescriptor, &exceptFDs_);
		}

		objc_autoreleasePoolPop(pool);
	}

	objects = [writeStreams objects];
	count = [writeStreams count];

	for (i = 0; i < count; i++) {
		int fileDescriptor = [objects[i] fileDescriptor];

		pool = objc_autoreleasePoolPush();

		if (FD_ISSET(fileDescriptor, &writeFDs_)) {
			realEvents++;
			[delegate streamIsReadyForWriting: objects[i]];
		}

		if (FD_ISSET(fileDescriptor, &exceptFDs_)) {
			realEvents++;
			[delegate streamDidReceiveException: objects[i]];
		}

		objc_autoreleasePoolPop(pool);
	}








|



|




|







|









|



|




|







114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
#endif
	}

	objects = [readStreams objects];
	count = [readStreams count];

	for (i = 0; i < count; i++) {
		int fd = [objects[i] fileDescriptorForReading];

		pool = objc_autoreleasePoolPush();

		if (FD_ISSET(fd, &readFDs_)) {
			realEvents++;
			[delegate streamIsReadyForReading: objects[i]];
		}

		if (FD_ISSET(fd, &exceptFDs_)) {
			realEvents++;
			[delegate streamDidReceiveException: objects[i]];

			/*
			 * Prevent calling it twice in case the FD is in both
			 * sets.
			 */
			FD_CLR(fd, &exceptFDs_);
		}

		objc_autoreleasePoolPop(pool);
	}

	objects = [writeStreams objects];
	count = [writeStreams count];

	for (i = 0; i < count; i++) {
		int fd = [objects[i] fileDescriptorForWriting];

		pool = objc_autoreleasePoolPush();

		if (FD_ISSET(fd, &writeFDs_)) {
			realEvents++;
			[delegate streamIsReadyForWriting: objects[i]];
		}

		if (FD_ISSET(fd, &exceptFDs_)) {
			realEvents++;
			[delegate streamDidReceiveException: objects[i]];
		}

		objc_autoreleasePoolPop(pool);
	}