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
3b193447
Commit
3b193447
authored
Aug 01, 2011
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use 'm4 -P' to avoid clashing of Python's len with m4's len
parent
d85f6df8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
gevent/core_.pyx
gevent/core_.pyx
+6
-6
setup.py
setup.py
+1
-1
No files found.
gevent/core_.pyx
View file @
3b193447
...
...
@@ -391,12 +391,12 @@ cdef public class loop [object PyGeventLoopObject, type PyGeventLoop_Type]:
return
result
define
(
INCREF
,
``
if
self
.
_incref
==
0
:
m4_
define
(
INCREF
,
``
if
self
.
_incref
==
0
:
self
.
_incref
=
1
Py_INCREF
(
<
PyObjectPtr
>
self
)
''
)
define
(
WATCHER_BASE
,
`
cdef
public
loop
loop
m4_
define
(
WATCHER_BASE
,
`
cdef
public
loop
loop
cdef
object
_callback
cdef
public
tuple
args
cdef
readonly
int
_incref
# 1 - increfed, 0 - not increfed
...
...
@@ -445,27 +445,27 @@ define(WATCHER_BASE, `cdef public loop loop
INCREF
')
define(ACTIVE, `property active:
m4_
define(ACTIVE, `property active:
def __get__(self):
return True if libev.ev_is_active(&self._watcher) else False'
)
define
(
START
,
`
def
start
(
self
,
object
callback
,
*
args
):
m4_
define
(
START
,
`
def
start
(
self
,
object
callback
,
*
args
):
self
.
callback
=
callback
self
.
args
=
args
libev
.
ev_
$
1
_start
(
self
.
loop
.
_ptr
,
&
self
.
_watcher
)
INCREF
')
define(WATCHER, `WATCHER_BASE($1)
m4_
define(WATCHER, `WATCHER_BASE($1)
START($1)
ACTIVE($1)'
)
define
(
INIT
,
`
def
__init__
(
self
,
loop
loop
$
2
):
m4_
define
(
INIT
,
`
def
__init__
(
self
,
loop
loop
$
2
):
libev
.
ev_
$
1
_init
(
&
self
.
_watcher
,
<
void
*>
gevent_callback_
$
1
$
3
)
self
.
loop
=
loop
self
.
_incref
=
0
')
...
...
setup.py
View file @
3b193447
...
...
@@ -139,7 +139,7 @@ def replace_in_file(filename, old, new, check=True):
def
run_cython_core
(
cython_command
):
if
need_update
(
'gevent/core.pyx'
,
'gevent/core_.pyx'
):
system
(
'm4 gevent/core_.pyx > core.pyx && mv core.pyx gevent/'
)
system
(
'm4
-P
gevent/core_.pyx > core.pyx && mv core.pyx gevent/'
)
if
need_update
(
'gevent/gevent.core.c'
,
'gevent/core.p*x*'
,
'gevent/libev.pxd'
):
if
0
==
system
(
'%s gevent/core.pyx -o gevent.core.c && mv gevent.core.* gevent/'
%
(
cython_command
,
)):
replace_in_file
(
'gevent/gevent.core.c'
,
'
\
n
\
n
#endif /* Py_PYTHON_H */'
,
'
\
n
#include "callbacks.c"
\
n
#endif /* Py_PYTHON_H */'
)
...
...
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