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
63adb8e7
Commit
63adb8e7
authored
Jun 24, 2015
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lint
parent
fd57ead7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
gevent/corecffi.py
gevent/corecffi.py
+6
-4
No files found.
gevent/corecffi.py
View file @
63adb8e7
...
...
@@ -215,7 +215,7 @@ _watcher_types = ['ev_io',
'ev_fork'
,
'ev_async'
,
'ev_child'
,
'ev_stat'
,]
'ev_stat'
,
]
_source
=
""" // passed to the real C compiler
#define LIBEV_EMBED 1
...
...
@@ -244,15 +244,14 @@ for _watcher_type in _watcher_types:
...;
};
static void _gevent_%s_callback(struct ev_loop* loop, struct %s* watcher, int revents);
"""
%
(
_watcher_type
,
_watcher_type
,
_watcher_type
,
_watcher_type
)
"""
%
(
_watcher_type
,
_watcher_type
,
_watcher_type
,
_watcher_type
)
_source
+=
"""
struct gevent_%s {
struct %s watcher;
void* handle;
};
"""
%
(
_watcher_type
,
_watcher_type
)
"""
%
(
_watcher_type
,
_watcher_type
)
_source
+=
"""
static void _gevent_%s_callback(struct ev_loop* loop, struct %s* watcher, int revents)
...
...
@@ -279,6 +278,7 @@ del thisdir, include_dirs, _watcher_type, _watcher_types
libev
.
vfd_open
=
libev
.
vfd_get
=
lambda
fd
:
fd
libev
.
vfd_free
=
lambda
fd
:
None
@
ffi
.
callback
(
"int(void* handle, int revents)"
)
def
_python_callback
(
handle
,
revents
):
watcher
=
ffi
.
from_handle
(
handle
)
...
...
@@ -298,6 +298,7 @@ libev.python_callback = _python_callback
# Therefore the other functions need to correctly deal with an
# invalid handle
@
ffi
.
callback
(
"void(void* handle, int revents)"
)
def
_python_handle_error
(
handle
,
revents
):
try
:
...
...
@@ -318,6 +319,7 @@ def _python_handle_error(handle, revents):
return
libev
.
python_handle_error
=
_python_handle_error
@
ffi
.
callback
(
"void(void* handle)"
)
def
_python_stop
(
handle
):
try
:
...
...
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