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
11fb2737
Commit
11fb2737
authored
Apr 21, 2011
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix build problem on python2.5
parent
fad78acb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
21 deletions
+24
-21
gevent/core.pyx
gevent/core.pyx
+17
-14
gevent/evdns.pxi
gevent/evdns.pxi
+5
-5
gevent/evhttp.pxi
gevent/evhttp.pxi
+2
-2
No files found.
gevent/core.pyx
View file @
11fb2737
...
@@ -50,17 +50,20 @@ cdef extern from "sys/types.h":
...
@@ -50,17 +50,20 @@ cdef extern from "sys/types.h":
ctypedef
unsigned
char
u_char
ctypedef
unsigned
char
u_char
cdef
extern
from
"Python.h"
:
cdef
extern
from
"Python.h"
:
void
Py_INCREF
(
void
*
o
)
struct
PyObject
:
void
Py_DECREF
(
void
*
o
)
pass
void
Py_XDECREF
(
void
*
o
)
ctypedef
PyObject
*
PyObjectPtr
"PyObject*"
object
PyString_FromStringAndSize
(
char
*
v
,
int
len
)
void
Py_INCREF
(
PyObjectPtr
o
)
object
PyString_FromString
(
char
*
v
)
void
Py_DECREF
(
PyObjectPtr
o
)
void
Py_XDECREF
(
PyObjectPtr
o
)
object
PyString_FromStringAndSize
(
char
*
v
,
int
len
)
object
PyString_FromString
(
char
*
v
)
cdef
extern
from
"frameobject.h"
:
cdef
extern
from
"frameobject.h"
:
ctypedef
struct
PyThreadState
:
ctypedef
struct
PyThreadState
:
void
*
exc_type
PyObjectPtr
exc_type
void
*
exc_value
PyObjectPtr
exc_value
void
*
exc_traceback
PyObjectPtr
exc_traceback
PyThreadState
*
PyThreadState_GET
()
PyThreadState
*
PyThreadState_GET
()
...
@@ -164,12 +167,12 @@ cdef class event:
...
@@ -164,12 +167,12 @@ cdef class event:
cdef
_addref
(
self
):
cdef
_addref
(
self
):
if
self
.
_incref
<=
0
:
if
self
.
_incref
<=
0
:
Py_INCREF
(
<
void
*
>
self
)
Py_INCREF
(
<
PyObjectPtr
>
self
)
self
.
_incref
+=
1
self
.
_incref
+=
1
cdef
_delref
(
self
):
cdef
_delref
(
self
):
if
self
.
_incref
>
0
:
if
self
.
_incref
>
0
:
Py_DECREF
(
<
void
*
>
self
)
Py_DECREF
(
<
PyObjectPtr
>
self
)
self
.
_incref
-=
1
self
.
_incref
-=
1
property
pending
:
property
pending
:
...
@@ -469,8 +472,8 @@ def set_exc_info(object type, object value):
...
@@ -469,8 +472,8 @@ def set_exc_info(object type, object value):
tstate
.
exc_type
=
NULL
tstate
.
exc_type
=
NULL
tstate
.
exc_value
=
NULL
tstate
.
exc_value
=
NULL
else
:
else
:
Py_INCREF
(
<
void
*
>
type
)
Py_INCREF
(
<
PyObjectPtr
>
type
)
Py_INCREF
(
<
void
*
>
value
)
Py_INCREF
(
<
PyObjectPtr
>
value
)
tstate
.
exc_type
=
<
void
*
>
type
tstate
.
exc_type
=
<
PyObjectPtr
>
type
tstate
.
exc_value
=
<
void
*
>
value
tstate
.
exc_value
=
<
PyObjectPtr
>
value
tstate
.
exc_traceback
=
NULL
tstate
.
exc_traceback
=
NULL
gevent/evdns.pxi
View file @
11fb2737
...
@@ -56,7 +56,7 @@ def dns_err_to_string(int err):
...
@@ -56,7 +56,7 @@ def dns_err_to_string(int err):
cdef
void
__evdns_callback
(
int
code
,
char
type
,
int
count
,
int
ttl
,
void
*
addrs
,
void
*
arg
)
with
gil
:
cdef
void
__evdns_callback
(
int
code
,
char
type
,
int
count
,
int
ttl
,
void
*
addrs
,
void
*
arg
)
with
gil
:
cdef
int
i
cdef
int
i
cdef
object
callback
=
<
object
>
arg
cdef
object
callback
=
<
object
>
arg
Py_DECREF
(
<
void
*
>
callback
)
Py_DECREF
(
<
PyObjectPtr
>
callback
)
cdef
object
addr
cdef
object
addr
cdef
object
result
cdef
object
result
...
@@ -91,7 +91,7 @@ def dns_resolve_ipv4(char *name, int flags, object callback):
...
@@ -91,7 +91,7 @@ def dns_resolve_ipv4(char *name, int flags, object callback):
cdef
int
result
=
evdns_resolve_ipv4
(
name
,
flags
,
__evdns_callback
,
<
void
*>
callback
)
cdef
int
result
=
evdns_resolve_ipv4
(
name
,
flags
,
__evdns_callback
,
<
void
*>
callback
)
if
result
:
if
result
:
raise
IOError
(
'evdns_resolve_ipv4(%r, %r) returned %s'
%
(
name
,
flags
,
result
,
))
raise
IOError
(
'evdns_resolve_ipv4(%r, %r) returned %s'
%
(
name
,
flags
,
result
,
))
Py_INCREF
(
<
void
*
>
callback
)
Py_INCREF
(
<
PyObjectPtr
>
callback
)
def
dns_resolve_ipv6
(
char
*
name
,
int
flags
,
object
callback
):
def
dns_resolve_ipv6
(
char
*
name
,
int
flags
,
object
callback
):
...
@@ -104,7 +104,7 @@ def dns_resolve_ipv6(char *name, int flags, object callback):
...
@@ -104,7 +104,7 @@ def dns_resolve_ipv6(char *name, int flags, object callback):
cdef
int
result
=
evdns_resolve_ipv6
(
name
,
flags
,
__evdns_callback
,
<
void
*>
callback
)
cdef
int
result
=
evdns_resolve_ipv6
(
name
,
flags
,
__evdns_callback
,
<
void
*>
callback
)
if
result
:
if
result
:
raise
IOError
(
'evdns_resolve_ip6(%r, %r) returned %s'
%
(
name
,
flags
,
result
,
))
raise
IOError
(
'evdns_resolve_ip6(%r, %r) returned %s'
%
(
name
,
flags
,
result
,
))
Py_INCREF
(
<
void
*
>
callback
)
Py_INCREF
(
<
PyObjectPtr
>
callback
)
def
dns_resolve_reverse
(
char
*
packed_ip
,
int
flags
,
object
callback
):
def
dns_resolve_reverse
(
char
*
packed_ip
,
int
flags
,
object
callback
):
...
@@ -117,7 +117,7 @@ def dns_resolve_reverse(char* packed_ip, int flags, object callback):
...
@@ -117,7 +117,7 @@ def dns_resolve_reverse(char* packed_ip, int flags, object callback):
cdef
int
result
=
evdns_resolve_reverse
(
<
void
*>
packed_ip
,
flags
,
__evdns_callback
,
<
void
*>
callback
)
cdef
int
result
=
evdns_resolve_reverse
(
<
void
*>
packed_ip
,
flags
,
__evdns_callback
,
<
void
*>
callback
)
if
result
:
if
result
:
raise
IOError
(
'evdns_resolve_reverse(%r, %r) returned %s'
%
(
packed_ip
,
flags
,
result
,
))
raise
IOError
(
'evdns_resolve_reverse(%r, %r) returned %s'
%
(
packed_ip
,
flags
,
result
,
))
Py_INCREF
(
<
void
*
>
callback
)
Py_INCREF
(
<
PyObjectPtr
>
callback
)
def
dns_resolve_reverse_ipv6
(
char
*
packed_ip
,
int
flags
,
object
callback
):
def
dns_resolve_reverse_ipv6
(
char
*
packed_ip
,
int
flags
,
object
callback
):
...
@@ -130,4 +130,4 @@ def dns_resolve_reverse_ipv6(char* packed_ip, int flags, object callback):
...
@@ -130,4 +130,4 @@ def dns_resolve_reverse_ipv6(char* packed_ip, int flags, object callback):
cdef
int
result
=
evdns_resolve_reverse_ipv6
(
<
void
*>
packed_ip
,
flags
,
__evdns_callback
,
<
void
*>
callback
)
cdef
int
result
=
evdns_resolve_reverse_ipv6
(
<
void
*>
packed_ip
,
flags
,
__evdns_callback
,
<
void
*>
callback
)
if
result
:
if
result
:
raise
IOError
(
'evdns_resolve_reverse_ipv6(%r, %r) returned %s'
%
(
packed_ip
,
flags
,
result
,
))
raise
IOError
(
'evdns_resolve_reverse_ipv6(%r, %r) returned %s'
%
(
packed_ip
,
flags
,
result
,
))
Py_INCREF
(
<
void
*
>
callback
)
Py_INCREF
(
<
PyObjectPtr
>
callback
)
gevent/evhttp.pxi
View file @
11fb2737
...
@@ -485,12 +485,12 @@ cdef class http_request_client(http_request_base):
...
@@ -485,12 +485,12 @@ cdef class http_request_client(http_request_base):
cdef
_addref
(
self
):
cdef
_addref
(
self
):
if
self
.
_incref
<=
0
:
if
self
.
_incref
<=
0
:
Py_INCREF
(
<
void
*
>
self
)
Py_INCREF
(
<
PyObjectPtr
>
self
)
self
.
_incref
+=
1
self
.
_incref
+=
1
cdef
_delref
(
self
):
cdef
_delref
(
self
):
if
self
.
_incref
>
0
:
if
self
.
_incref
>
0
:
Py_DECREF
(
<
void
*
>
self
)
Py_DECREF
(
<
PyObjectPtr
>
self
)
self
.
_incref
-=
1
self
.
_incref
-=
1
self
.
callback
=
None
self
.
callback
=
None
...
...
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