File tree Expand file tree Collapse file tree 4 files changed +16
-4
lines changed Expand file tree Collapse file tree 4 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 11recursive-include examples *.py
22recursive-include tests *.py *.pem
3- recursive-include uvloop *.pyx *.pxd *.pxi *.py
3+ recursive-include uvloop *.pyx *.pxd *.pxi *.py *.c *.h
44recursive-include vendor/libuv *
55recursive-exclude vendor/libuv/.git *
66recursive-exclude vendor/libuv/docs *
Original file line number Diff line number Diff line change 1+ #include "uv.h"
2+
3+
4+ // uv_poll_event.UV_DISCONNECT is available since libuv v1.9.0
5+ #if UV_VERSION_HEX < 0x10900
6+ #define UV_DISCONNECT 0
7+ #endif
Original file line number Diff line number Diff line change @@ -4,6 +4,12 @@ from posix.types cimport gid_t, uid_t
44from . cimport system
55
66
7+ cdef extern from " includes/compat.h" :
8+ # Member of uv_poll_event, in compat.h for compatibility
9+ # with libuv < v1.9.0
10+ cdef int UV_DISCONNECT
11+
12+
713cdef extern from " uv.h" nogil:
814 cdef int UV_EACCES
915 cdef int UV_EAGAIN
@@ -183,8 +189,8 @@ cdef extern from "uv.h" nogil:
183189
184190 ctypedef enum uv_poll_event:
185191 UV_READABLE = 1 ,
186- UV_WRITABLE = 2 ,
187- UV_DISCONNECT = 4
192+ UV_WRITABLE = 2
193+ # UV_DISCONNECT = 4 ; see compat.h for details
188194
189195 ctypedef enum uv_udp_flags:
190196 UV_UDP_IPV6ONLY = 1 ,
Original file line number Diff line number Diff line change @@ -43,7 +43,6 @@ cdef Loop __main_loop__ = None
4343cdef class Loop:
4444 def __cinit__ (self ):
4545 cdef int err
46-
4746 # Install PyMem* memory allocators if they aren't installed yet.
4847 __install_pymem()
4948
You can’t perform that action at this time.
0 commit comments