File pyevent-0.3-timeout-assignment.patch of Package python-event
Index: b/event.pyx
===================================================================
--- a/event.pyx
+++ b/event.pyx
@@ -152,8 +152,8 @@ cdef class event:
Py_INCREF(self)
self.timeout = timeout
if timeout >= 0.0:
- self.tv.tv_sec = <long>timeout
- self.tv.tv_usec = (timeout - <float>self.tv.tv_sec) * 1000000.0
+ self.tv.tv_sec = <unsigned int>timeout
+ self.tv.tv_usec = <unsigned int>((timeout - <float>self.tv.tv_sec) * 1000000.0)
event_add(&self.ev, &self.tv)
else:
self.tv.tv_sec = self.tv.tv_usec = 0