Use vfd_socket_t on all platforms.
cython ignores the preprocessor directives we previously had in libev.pxd, so that was doing nothing, and it was treating vfd_socket_t just as something it had to turn into an int. The function it used to do this was the same function it used to turn a generic PyObject into an int, once all the typedefs were substituted in (which does use the c preprocessor from libev_vfd.h). So it should be functionally equivalent. The vfd_* functions are no-op macros on POSIX, so there shouldn't be a performance difference. The minor exception is that __dealloc__ is always defined, and although it's a static function suitable to inline, there is an extra Python API call to PyErr_Fetch and PyErr_Restore. But if that makes a difference, I didn't spot it.
Showing
Please register or sign in to comment