This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients christian.heimes, loewis, mbroughton, pitrou, therve
Date 2009-10-29.13:29:41
SpamBayes Score 2.7109663e-09
Marked as misclassified No
Message-id <1256822983.89.0.678272373714.issue7211@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2009-10-29 13:29:43pitrousetrecipients: + pitrou, loewis, therve, christian.heimes, mbroughton
2009-10-29 13:29:43pitrousetmessageid: <1256822983.89.0.678272373714.issue7211@psf.upfronthosting.co.za>
2009-10-29 13:29:42pitroulinkissue7211 messages
2009-10-29 13:29:41pitroucreate