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 1
1
recursive-include examples *.py
2
2
recursive-include tests *.py *.pem
3
- recursive-include uvloop *.pyx *.pxd *.pxi *.py
3
+ recursive-include uvloop *.pyx *.pxd *.pxi *.py *.c *.h
4
4
recursive-include vendor/libuv *
5
5
recursive-exclude vendor/libuv/.git *
6
6
recursive-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
4
4
from . cimport system
5
5
6
6
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
+
7
13
cdef extern from " uv.h" nogil:
8
14
cdef int UV_EACCES
9
15
cdef int UV_EAGAIN
@@ -183,8 +189,8 @@ cdef extern from "uv.h" nogil:
183
189
184
190
ctypedef enum uv_poll_event:
185
191
UV_READABLE = 1 ,
186
- UV_WRITABLE = 2 ,
187
- UV_DISCONNECT = 4
192
+ UV_WRITABLE = 2
193
+ # UV_DISCONNECT = 4 ; see compat.h for details
188
194
189
195
ctypedef enum uv_udp_flags:
190
196
UV_UDP_IPV6ONLY = 1 ,
Original file line number Diff line number Diff line change @@ -43,7 +43,6 @@ cdef Loop __main_loop__ = None
43
43
cdef class Loop:
44
44
def __cinit__ (self ):
45
45
cdef int err
46
-
47
46
# Install PyMem* memory allocators if they aren't installed yet.
48
47
__install_pymem()
49
48
You can’t perform that action at this time.
0 commit comments