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
e0c86efd
Commit
e0c86efd
authored
Sep 10, 2009
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove HAS_EVDNS and check for EVENTDNS_H
parent
3fc2fc6b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
19 deletions
+0
-19
gevent/core.pyx
gevent/core.pyx
+0
-1
gevent/evdns.pxi
gevent/evdns.pxi
+0
-18
No files found.
gevent/core.pyx
View file @
e0c86efd
...
...
@@ -375,7 +375,6 @@ def get_method():
cdef
extern
from
*
:
cdef
void
emit_ifdef
"#if defined(_EVENT_VERSION) //"
()
cdef
void
emit_evdns_ifdef
"#if defined(EVENTDNS_H) //"
()
cdef
void
emit_else
"#else //"
()
cdef
void
emit_endif
"#endif //"
()
...
...
gevent/evdns.pxi
View file @
e0c86efd
...
...
@@ -54,17 +54,9 @@ DNS_IPv6_AAAA = 3
# Flags
DNS_QUERY_NO_SEARCH
=
1
emit_evdns_ifdef
()
HAS_EVDNS
=
1
emit_else
()
HAS_EVDNS
=
0
emit_endif
()
def
dns_init
():
emit_evdns_ifdef
()
"""Initialize async DNS resolver."""
evdns_init
()
emit_endif
()
cdef
void
__evdns_callback
(
int
result
,
char
t
,
int
count
,
int
ttl
,
void
*
addrs
,
void
*
arg
)
with
gil
:
...
...
@@ -102,11 +94,9 @@ def dns_resolve_ipv4(char *name, int flags, callback, *args):
callback -- callback with (result, type, ttl, addrs, *args) prototype
args -- option callback arguments
"""
emit_evdns_ifdef
()
t
=
(
callback
,
args
)
Py_INCREF
(
t
)
evdns_resolve_ipv4
(
name
,
flags
,
__evdns_callback
,
<
void
*>
t
)
emit_endif
()
def
dns_resolve_ipv6
(
char
*
name
,
int
flags
,
callback
,
*
args
):
"""Lookup an AAAA record for a given name.
...
...
@@ -118,11 +108,9 @@ def dns_resolve_ipv6(char *name, int flags, callback, *args):
callback -- callback with (result, type, ttl, addrs, *args) prototype
args -- option callback arguments
"""
emit_evdns_ifdef
()
t
=
(
callback
,
args
)
Py_INCREF
(
t
)
evdns_resolve_ipv6
(
name
,
flags
,
__evdns_callback
,
<
void
*>
t
)
emit_endif
()
def
dns_resolve_reverse
(
char
*
ip
,
int
flags
,
callback
,
*
args
):
"""Lookup a PTR record for a given IPv4 address.
...
...
@@ -134,13 +122,11 @@ def dns_resolve_reverse(char *ip, int flags, callback, *args):
callback -- callback with (result, type, ttl, addrs, *args) prototype
args -- option callback arguments
"""
emit_evdns_ifdef
()
t
=
(
callback
,
args
)
Py_INCREF
(
t
)
cdef
in_addr
addr
inet_aton
(
ip
,
&
addr
)
evdns_resolve_reverse
(
&
addr
,
flags
,
__evdns_callback
,
<
void
*>
t
)
emit_endif
()
def
dns_resolve_reverse_ipv6
(
char
*
ip
,
int
flags
,
callback
,
*
args
):
"""Lookup a PTR record for a given IPv6 address.
...
...
@@ -152,16 +138,12 @@ def dns_resolve_reverse_ipv6(char *ip, int flags, callback, *args):
callback -- callback with (result, type, ttl, addrs, *args) prototype
args -- option callback arguments
"""
emit_evdns_ifdef
()
t
=
(
callback
,
args
)
Py_INCREF
(
t
)
cdef
in6_addr
addr
inet_pton
(
AF_INET6
,
ip
,
&
addr
)
evdns_resolve_reverse_ipv6
(
&
addr
,
flags
,
__evdns_callback
,
<
void
*>
t
)
emit_endif
()
def
dns_shutdown
(
int
fail_requests
=
0
):
"""Shutdown the async DNS resolver and terminate all active requests."""
emit_evdns_ifdef
()
evdns_shutdown
(
fail_requests
)
emit_endif
()
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