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
75917789
Commit
75917789
authored
Jan 22, 2018
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
convert feed to a shared function. Now around 23776 LOC, more than 10K less than we started.
parent
82f34140
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
src/gevent/libev/corecext.ppyx
src/gevent/libev/corecext.ppyx
+8
-9
No files found.
src/gevent/libev/corecext.ppyx
View file @
75917789
...
...
@@ -680,15 +680,6 @@ cdef public class callback [object PyGeventCallbackObject, type PyGeventCallback
Py_DECREF(<PyObjectPtr>self) \
self._flags &= ~1 \
\
\
def feed(self, int revents, object callback, *args): \
_check_loop(self.loop) \
self.callback = callback \
self.args = args \
LIBEV_UNREF \
libev.ev_feed_event(self.loop._ptr, &self._watcher, revents) \
PYTHON_INCREF \
\
cdef void _do_libev_start(self): \
libev.ev_##TYPE##_start(self.loop._ptr, &self._watcher)
...
...
@@ -776,6 +767,14 @@ cdef public class watcher [object PyGeventWatcherObject, type PyGeventWatcher_Ty
# This is not allowed to fail, and must be implemented by subclasses.
return
def feed(self, int revents, object callback, *args):
_check_loop(self.loop)
self.callback = callback
self.args = args
LIBEV_UNREF
libev.ev_feed_event(self.loop._ptr, self.__watcher, revents)
PYTHON_INCREF
def __repr__(self):
if Py_ReprEnter(<PyObjectPtr>self) != 0:
return "<...>"
...
...
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