Antoine Pitrou <pit...@free.fr> added the comment: According to man pages on the Web, the kevent structure is:
struct kevent { uintptr_t ident; /* identifier for this event */ short filter; /* filter for event */ u_short flags; /* action flags for kqueue */ u_int fflags; /* filter flag value */ intptr_t data; /* filter data value */ void *udata; /* opaque user data identifier */ }; So the `ident` field is indeed an uintptr_t. However the patch is slightly wrong IMO: - you should not blindly use `long long`. Python already defines a "Py_uintptr_t" type. If you need more information you should conditional compilation such as in (for the off_t type) http://svn.python.org/view/python/trunk/Modules/_io/_iomodule.h?view=markup - in tests, you should use sys.maxsize (which gives you the max value of a ssize_t integer) rather than choosing based on platform.architecture(): >>> sys.maxsize 9223372036854775807 >>> 2**64*1 18446744073709551616L >>> sys.maxsize*2 + 1 18446744073709551615L PS : a patch against trunk or py3k is preferred, but in this case it would probably apply cleanly anyway ---------- nosy: +pitrou _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7211> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com