* file descriptor, but the situation is much more complicated on
* Windows. If you need to use g_poll() in code that has to run on
* Windows, the easiest solution is to construct all of your
- * #GPollFD<!-- -->s with g_io_channel_win32_make_pollfd().
+ * #GPollFDs with g_io_channel_win32_make_pollfd().
*
- * Return value: the number of entries in @fds whose %revents fields
+ * Returns: the number of entries in @fds whose %revents fields
* were filled in, or 0 if the operation timed out, or -1 on error or
* if the call was interrupted.
*
}
else if (f->fd > 0)
{
- /* Don't add the same handle several times into the array, as
- * docs say that is not allowed, even if it actually does seem
- * to work.
- */
- gint i;
-
- for (i = 0; i < nhandles; i++)
- if (handles[i] == (HANDLE) f->fd)
- break;
-
- if (i == nhandles)
- {
- if (nhandles == MAXIMUM_WAIT_OBJECTS)
- {
- g_warning ("Too many handles to wait for!\n");
- break;
- }
- else
- {
- if (_g_main_poll_debug)
- g_print (" %p", (HANDLE) f->fd);
- handles[nhandles++] = (HANDLE) f->fd;
- }
- }
+ if (nhandles == MAXIMUM_WAIT_OBJECTS)
+ {
+ g_warning ("Too many handles to wait for!\n");
+ break;
+ }
+ else
+ {
+ if (_g_main_poll_debug)
+ g_print (" %p", (HANDLE) f->fd);
+ handles[nhandles++] = (HANDLE) f->fd;
+ }
}
if (_g_main_poll_debug)