Commit 1f9a1f06 authored by Denis Bilenko's avatar Denis Bilenko

use PyBytes_FromString instead of PyString_FromString (py3k)

parent 359ed6c4
......@@ -27,7 +27,7 @@ cdef extern from "dnshelper.c":
# this imports _socket lazily
object get_socket_error()
object get_socket_gaierror()
object PyString_FromString(char*)
object PyBytes_FromString(char*)
int PyTuple_Check(object)
int PyArg_ParseTuple(object, char*, ...) except 0
struct sockaddr_in6:
......@@ -207,11 +207,11 @@ cdef void gevent_ares_nameinfo_callback(void *arg, int status, int timeouts, cha
callback(result(None, get_socket_gaierror()(status, strerror(status))))
else:
if c_node:
node = PyString_FromString(c_node)
node = PyBytes_FromString(c_node)
else:
node = None
if c_service:
service = PyString_FromString(c_service)
service = PyBytes_FromString(c_service)
else:
service = None
callback(result((node, service)))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment