Charles-François Natali <neolo...@free.fr> added the comment:

> ident and data are not pointers,

That's not the point.
struct kevent declaration should be the following:

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 */
};

If this doesn't match, you'll unpack garbage when extracting members,
and since it's an unaligned access, you can even get a SIGBUS (looks
like sparc64 doesn't allow unaligned access).

> I suppose that T_UINT and T_INT should be used instead of T_UINTPTR_T and  
> T_INTPTR_T.

Yes, we could do that on OpenBSD, but that's definitely an OpenBSD bug.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12181>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to