ObjFW  Diff

Differences From Artifact [269a665b2b]:

To Artifact [2971c119f2]:


274
275
276
277
278
279
280






281
282
283
284
285
286
287
		}

		if (fds_c[i].revents & POLLOUT) {
			num = [OFNumber numberWithInt: fds_c[i].fd];
			stream = [fdToStream objectForKey: num];
			[delegate streamDidBecomeReadyForReading: stream];
		}







		fds_c[i].revents = 0;
	}
#else
# ifdef FD_COPY
	FD_COPY(readfds, readfds_);
	FD_COPY(writefds, writefds_);







>
>
>
>
>
>







274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
		}

		if (fds_c[i].revents & POLLOUT) {
			num = [OFNumber numberWithInt: fds_c[i].fd];
			stream = [fdToStream objectForKey: num];
			[delegate streamDidBecomeReadyForReading: stream];
		}

		if (fds_c[i].revents & POLLERR) {
			num = [OFNumber numberWithInt: fds_c[i].fd];
			stream = [fdToStream objectForKey: num];
			[delegate streamDidReceiveException: stream];
		}

		fds_c[i].revents = 0;
	}
#else
# ifdef FD_COPY
	FD_COPY(readfds, readfds_);
	FD_COPY(writefds, writefds_);
297
298
299
300
301
302
303










304
305
306
307
308
309
310
311
312
313



314
315
316
317
318
319
320
		return NO;

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

		if (FD_ISSET(fd, &readfds_))
			[delegate streamDidBecomeReadyForReading: cArray[i]];










	}

	cArray = [writeStreams cArray];
	count = [writeStreams count];

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

		if (FD_ISSET(fd, &writefds_))
			[delegate streamDidBecomeReadyForWriting: cArray[i]];



	}
#endif

	[pool release];

	return YES;
}







>
>
>
>
>
>
>
>
>
>










>
>
>







303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
		return NO;

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

		if (FD_ISSET(fd, &readfds_))
			[delegate streamDidBecomeReadyForReading: cArray[i]];

		if (FD_ISSET(fd, &exceptfds_)) {
			[delegate streamDidReceiveException: cArray[i]];

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

	cArray = [writeStreams cArray];
	count = [writeStreams count];

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

		if (FD_ISSET(fd, &writefds_))
			[delegate streamDidBecomeReadyForWriting: cArray[i]];

		if (FD_ISSET(fd, &exceptfds_))
			[delegate streamDidReceiveException: cArray[i]];
	}
#endif

	[pool release];

	return YES;
}