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
96b65df3
Commit
96b65df3
authored
Jan 22, 2018
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert remaining old-style properties into @propery
parent
41c260fa
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
50 deletions
+40
-50
src/gevent/libev/corecext.ppyx
src/gevent/libev/corecext.ppyx
+40
-50
No files found.
src/gevent/libev/corecext.ppyx
View file @
96b65df3
...
@@ -344,24 +344,20 @@ cdef public class loop [object PyGeventLoopObject, type PyGeventLoop_Type]:
...
@@ -344,24 +344,20 @@ cdef public class loop [object PyGeventLoopObject, type PyGeventLoop_Type]:
libev.ev_loop_destroy(self._ptr)
libev.ev_loop_destroy(self._ptr)
self._ptr = NULL
self._ptr = NULL
property ptr:
@property
def ptr(self):
def __get__(self):
return <size_t>self._ptr
return <size_t>self._ptr
property WatcherType:
@property
def WatcherType(self):
def __get__(self):
return watcher
return watcher
property MAXPRI:
@property
def MAXPRI(self):
def __get__(self):
return libev.EV_MAXPRI
return libev.EV_MAXPRI
property MINPRI:
@property
def MINPRI(self):
def __get__(self):
return libev.EV_MINPRI
return libev.EV_MINPRI
def _handle_syserr(self, message, errno):
def _handle_syserr(self, message, errno):
...
@@ -429,33 +425,28 @@ cdef public class loop [object PyGeventLoopObject, type PyGeventLoop_Type]:
...
@@ -429,33 +425,28 @@ cdef public class loop [object PyGeventLoopObject, type PyGeventLoop_Type]:
def __repr__(self):
def __repr__(self):
return '<%s at 0x%x %s>' % (self.__class__.__name__, id(self), self._format())
return '<%s at 0x%x %s>' % (self.__class__.__name__, id(self), self._format())
property default:
@property
def default(self):
def __get__(self):
_check_loop(self)
_check_loop(self)
return True if libev.ev_is_default_loop(self._ptr) else False
return True if libev.ev_is_default_loop(self._ptr) else False
property iteration:
@property
def iteration(self):
def __get__(self):
_check_loop(self)
_check_loop(self)
return libev.ev_iteration(self._ptr)
return libev.ev_iteration(self._ptr)
property depth:
@property
def depth(self):
def __get__(self):
_check_loop(self)
_check_loop(self)
return libev.ev_depth(self._ptr)
return libev.ev_depth(self._ptr)
property backend_int:
@property
def backend_int(self):
def __get__(self):
_check_loop(self)
_check_loop(self)
return libev.ev_backend(self._ptr)
return libev.ev_backend(self._ptr)
property backend:
@property
def backend(self):
def __get__(self):
_check_loop(self)
_check_loop(self)
cdef unsigned int backend = libev.ev_backend(self._ptr)
cdef unsigned int backend = libev.ev_backend(self._ptr)
for key, value in _flags:
for key, value in _flags:
...
@@ -463,9 +454,8 @@ cdef public class loop [object PyGeventLoopObject, type PyGeventLoop_Type]:
...
@@ -463,9 +454,8 @@ cdef public class loop [object PyGeventLoopObject, type PyGeventLoop_Type]:
return value
return value
return backend
return backend
property pendingcnt:
@property
def pendingcnt(self):
def __get__(self):
_check_loop(self)
_check_loop(self)
return libev.ev_pending_count(self._ptr)
return libev.ev_pending_count(self._ptr)
...
...
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