- std::multimap<int,eSocketNotifier*>::iterator it;
- std::map<int,int> fd_merged;
- std::map<int,int>::const_iterator fd_merged_it;
-
- for (it = notifiers.begin(); it != notifiers.end(); ++it)
- fd_merged[it->first] |= it->second->getRequested();
-
- fd_merged_it = fd_merged.begin();
-
- int fdcount = fd_merged.size();
-
- // build the poll aray
- pollfd* pfd = new pollfd[fdcount]; // make new pollfd array
-
- for (int i=0; i < fdcount; i++, fd_merged_it++)
- {
- pfd[i].fd = fd_merged_it->first;
- pfd[i].events = fd_merged_it->second;
+ if (additional)
+ {
+ PyObject *key, *val;
+ int pos=0;
+ while (PyDict_Next(additional, &pos, &key, &val)) {
+ pfd[i].fd = PyObject_AsFileDescriptor(key);
+ pfd[i++].events = PyInt_AsLong(val);