ObjFW  Diff

Differences From Artifact [a6a3da0735]:

To Artifact [927bd4e34c]:


116
117
118
119
120
121
122
123
124
125
126
127
128
129
130

- (void)_removeFileDescriptorForWriting: (int)fd
{
	[self _removeFileDescriptor: fd
			 withEvents: POLLOUT];
}

- (BOOL)observeWithTimeout: (int)timeout
{
	void *pool = objc_autoreleasePoolPush();
	struct pollfd *FDsCArray;
	size_t i, nFDs;

	[self _processQueue];








|







116
117
118
119
120
121
122
123
124
125
126
127
128
129
130

- (void)_removeFileDescriptorForWriting: (int)fd
{
	[self _removeFileDescriptor: fd
			 withEvents: POLLOUT];
}

- (BOOL)observeWithTimeout: (double)timeout
{
	void *pool = objc_autoreleasePoolPush();
	struct pollfd *FDsCArray;
	size_t i, nFDs;

	[self _processQueue];

139
140
141
142
143
144
145
146

147
148
149
150
151
152
153
	nFDs = [FDs count];

#ifdef OPEN_MAX
	if (nFDs > OPEN_MAX)
		@throw [OFOutOfRangeException exceptionWithClass: [self class]];
#endif

	if (poll(FDsCArray, (nfds_t)nFDs, timeout) < 1)

		return NO;

	for (i = 0; i < nFDs; i++) {
		pool = objc_autoreleasePoolPush();

		if (FDsCArray[i].revents & POLLIN) {
			if (FDsCArray[i].fd == cancelFD[0]) {







|
>







139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
	nFDs = [FDs count];

#ifdef OPEN_MAX
	if (nFDs > OPEN_MAX)
		@throw [OFOutOfRangeException exceptionWithClass: [self class]];
#endif

	if (poll(FDsCArray, (nfds_t)nFDs,
	    (timeout != -1 ? timeout * 1000 : -1)) < 1)
		return NO;

	for (i = 0; i < nFDs; i++) {
		pool = objc_autoreleasePoolPush();

		if (FDsCArray[i].revents & POLLIN) {
			if (FDsCArray[i].fd == cancelFD[0]) {