Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
4f7d3298
Commit
4f7d3298
authored
Jan 22, 2018
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use a better size for vfd_socket_t on windows, and make sure to pass the VFD object to the watcher.
parent
04af61ff
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
12 deletions
+20
-12
src/gevent/libev/corecext.ppyx
src/gevent/libev/corecext.ppyx
+1
-1
src/gevent/libev/libev.pxd
src/gevent/libev/libev.pxd
+12
-2
src/gevent/libev/libev_vfd.h
src/gevent/libev/libev_vfd.h
+7
-9
No files found.
src/gevent/libev/corecext.ppyx
View file @
4f7d3298
...
...
@@ -810,7 +810,7 @@ cdef public class io(watcher) [object PyGeventIOObject, type PyGeventIO_Type]:
raise ValueError('illegal event mask: %r' % events)
# All the vfd_functions are no-ops on POSIX
cdef int vfd = libev.vfd_open(fd)
libev.ev_io_init(&self._watcher, <void *>gevent_callback_io, fd, events)
libev.ev_io_init(&self._watcher, <void *>gevent_callback_io,
v
fd, events)
self.__watcher = <libev.ev_watcher*>&self._watcher
def __dealloc__(self):
...
...
src/gevent/libev/libev.pxd
View file @
4f7d3298
# From cython/includes/libc/stdint.pxd
# Longness only used for type promotion.
# Actual compile time size used for conversions.
# 7.18 Integer types <stdint.h>
cdef
extern
from
"<stdint.h>"
nogil
:
# 7.18.1.4 Integer types capable of holding object pointers
ctypedef
ssize_t
intptr_t
cdef
extern
from
"libev_vfd.h"
:
# cython doesn't process pre-processor directives, so they
# don't matter in this file. It just takes the last definition it sees.
ctypedef
long
long
vfd_socket_t
ctypedef
intptr_t
vfd_socket_t
long
vfd_get
(
int
)
int
vfd_open
(
long
)
except
-
1
void
vfd_free
(
int
)
cdef
extern
from
"libev.h"
:
cdef
extern
from
"libev.h"
nogil
:
int
EV_MINPRI
int
EV_MAXPRI
...
...
src/gevent/libev/libev_vfd.h
View file @
4f7d3298
#ifdef _WIN32
# ifdef _WIN64
typedef
PY_LONG_LONG
vfd_socket_t
;
# define vfd_socket_object PyLong_FromLongLong
# else
/* _WIN32 && !_WIN64 */
typedef
long
vfd_socket_t
;
# define vfd_socket_object PyInt_FromLong
#endif
/* _WIN64 */
/* see discussion in the libuv directory: this is a SOCKET which is a
HANDLE which is a PVOID (even though they're really small ints),
and CPython and PyPy return that SOCKET cast to an int from
fileno()
*/
typedef
intptr_t
vfd_socket_t
;
#define vfd_socket_object PyLong_FromLongLong
#ifdef LIBEV_EMBED
/*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment