Martin v. Löwis <mar...@v.loewis.de> added the comment: > 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. ---------- _______________________________________ 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