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": ...@@ -27,7 +27,7 @@ cdef extern from "dnshelper.c":
# this imports _socket lazily # this imports _socket lazily
object get_socket_error() object get_socket_error()
object get_socket_gaierror() object get_socket_gaierror()
object PyString_FromString(char*) object PyBytes_FromString(char*)
int PyTuple_Check(object) int PyTuple_Check(object)
int PyArg_ParseTuple(object, char*, ...) except 0 int PyArg_ParseTuple(object, char*, ...) except 0
struct sockaddr_in6: struct sockaddr_in6:
...@@ -207,11 +207,11 @@ cdef void gevent_ares_nameinfo_callback(void *arg, int status, int timeouts, cha ...@@ -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)))) callback(result(None, get_socket_gaierror()(status, strerror(status))))
else: else:
if c_node: if c_node:
node = PyString_FromString(c_node) node = PyBytes_FromString(c_node)
else: else:
node = None node = None
if c_service: if c_service:
service = PyString_FromString(c_service) service = PyBytes_FromString(c_service)
else: else:
service = None service = None
callback(result((node, service))) 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