Message94534
> 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. |
|
Date |
User |
Action |
Args |
2009-10-26 22:48:43 | loewis | set | recipients:
+ loewis, therve, christian.heimes, mbroughton |
2009-10-26 22:48:41 | loewis | link | issue7211 messages |
2009-10-26 22:48:41 | loewis | create | |
|