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
93c219e3
Commit
93c219e3
authored
Mar 16, 2011
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core_.pyx: use cdef where useful
parent
3e052b3f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
gevent/core_.pyx
gevent/core_.pyx
+4
-5
No files found.
gevent/core_.pyx
View file @
93c219e3
...
...
@@ -112,7 +112,7 @@ _events = [(libev.EV_READ, 'READ'),
(
libev
.
EV_ERROR
,
'ERROR'
)]
def
_flags_to_list
(
unsigned
int
flags
):
cp
def
_flags_to_list
(
unsigned
int
flags
):
cdef
list
result
=
[]
for
code
,
value
in
_flags
:
if
flags
&
code
:
...
...
@@ -125,7 +125,7 @@ def _flags_to_list(unsigned int flags):
return
result
def
_flags_to_int
(
object
flags
)
:
cpdef
unsigned
int
_flags_to_int
(
object
flags
)
except
?
-
1
:
# Note, that order does not matter, libev has its own predefined order
if
flags
is
None
:
return
0
...
...
@@ -142,7 +142,7 @@ def _flags_to_int(object flags):
return
result
def
_events_to_str
(
int
events
):
cp
def
_events_to_str
(
int
events
):
cdef
list
result
=
[]
cdef
int
c_flag
for
(
flag
,
string
)
in
_events
:
...
...
@@ -455,8 +455,7 @@ cdef class watcher:
return ''
def _get_fd(int handle):
cdef int _get_fd(int handle) except -1:
cdef int fd = handle
IFDEF_WINDOWS()
fd = _open_osfhandle(fd, 0)
...
...
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