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 loewis
Recipients christian.heimes, loewis, mbroughton, therve
Date 2009-10-26.22:48:41
SpamBayes Score 7.2652995e-13
Marked as misclassified No
Message-id <4AE62745.7080600@v.loewis.de>
In-reply-to <1256596474.09.0.0106151031407.issue7211@psf.upfronthosting.co.za>
Content
> 1. What would be an appropriate member type for ident in
> kqueue_event_members? It seems like T_PYSSIZET might work. Otherwise, I
> am guessing that this will involve some #if's.

IIUC, it needs to match *exactly* the field size inside struct kevent.
So you'll have to use #ifs, possible along with autoconf tests (to
find out the sizes of the fields that typically vary across
implementations).

> 2. I think the format spec in kqueue_event_repr needs to change. It
> seems like this will also require some #if's.

Here, I would widen the fields to size_t, and use the size_t formatter
(assuming that all systems supporting kqueue also know how to print
size_t, or know to print long long).

> 3. kqueue_event_init uses PyObject_AsFileDescriptor to set the ident
> field. This should be doing a PyLong_Check first to see if
> PyLong_AsSomething would be more appropriate.

Hmm. I think I need to understand the use case better. Can you post
some sample code where this all matters?

If this *is* a regular file-like object, then surely int is enough, no?

> 4. I think the type of the result variable in kqueue_event_richcompare
> needs to be changed to long long int.

Fine with me. The question then is whether long long is available on
all systems that support kqueue.
History
Date User Action Args
2009-10-26 22:48:43loewissetrecipients: + loewis, therve, christian.heimes, mbroughton
2009-10-26 22:48:41loewislinkissue7211 messages
2009-10-26 22:48:41loewiscreate