Author: Richard Plangger <planri...@gmail.com>
Branch: py3.5
Changeset: r88981:116106fe6bde
Date: 2016-12-09 09:57 +0100
http://bitbucket.org/pypy/pypy/changeset/116106fe6bde/

Log:    revert call to getarg_w (does not translate)

diff --git a/pypy/module/_socket/interp_socket.py 
b/pypy/module/_socket/interp_socket.py
--- a/pypy/module/_socket/interp_socket.py
+++ b/pypy/module/_socket/interp_socket.py
@@ -89,8 +89,6 @@
 def addr_from_object(family, fd, space, w_address):
     if family == rsocket.AF_INET:
         w_host, w_port = space.unpackiterable(w_address, 2)
-        if space.isinstance_w(w_host, space.w_unicode):
-            pass
         host = space.str_w(w_host)
         port = space.int_w(w_port)
         port = make_ushort_port(space, port)
@@ -114,7 +112,7 @@
         # Not using space.fsencode_w since Linux allows embedded NULs.
         if space.isinstance_w(w_address, space.w_unicode):
             w_address = space.fsencode(w_address)
-        bytelike = space.getarg_w('y*', w_address)
+        bytelike = space.bytes_w(w_address) # getarg_w('y*', w_address)
         return rsocket.UNIXAddress(bytelike)
     if rsocket.HAS_AF_NETLINK and family == rsocket.AF_NETLINK:
         w_pid, w_groups = space.unpackiterable(w_address, 2)
@@ -458,7 +456,7 @@
         Like send(data, flags) but allows specifying the destination address.
         For IP sockets, the address is a pair (hostaddr, port).
         """
-        data = space.getarg_w('y*', w_data)
+        data = space.bufferstr_w(w_data)
         if w_param3 is None:
             # 2 args version
             flags = 0
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to