long poll_timeout = -1; /* infinite in case of empty timer list */
- if (!m_timer_list.empty() || twisted_timeout > 0)
+ if (!m_timer_list.empty())
{
- if (!m_timer_list.empty())
- {
- /* process all timers which are ready. first remove them out of the list. */
- while (!m_timer_list.empty() && (poll_timeout = timeout_usec( m_timer_list.begin()->getNextActivation() ) ) <= 0 )
- m_timer_list.begin()->activate();
- if (poll_timeout < 0)
- poll_timeout = 0;
- else /* convert us to ms */
- poll_timeout /= 1000;
- }
+ /* process all timers which are ready. first remove them out of the list. */
+ while (!m_timer_list.empty() && (poll_timeout = timeout_usec( m_timer_list.begin()->getNextActivation() ) ) <= 0 )
+ m_timer_list.begin()->activate();
+ if (poll_timeout < 0)
+ poll_timeout = 0;
+ else /* convert us to ms */
+ poll_timeout /= 1000;
}
if ((twisted_timeout > 0) && (poll_timeout > 0) && ((unsigned int)poll_timeout > twisted_timeout))
if (additional)
{
+#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
+ typedef int Py_ssize_t;
+# define PY_SSIZE_T_MAX INT_MAX
+# define PY_SSIZE_T_MIN INT_MIN
+#endif
PyObject *key, *val;
Py_ssize_t pos=0;
while (PyDict_Next(additional, &pos, &key, &val)) {