Author: andrewjlawrence
Branch: winmultiprocessing
Changeset: r96649:884c7e6b4d3a
Date: 2019-05-20 21:15 +0100
http://bitbucket.org/pypy/pypy/changeset/884c7e6b4d3a/

Log:    Corrected parameters to RSocket call.

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
@@ -207,7 +207,7 @@
                     from rpython.rlib.rsocket import _c
                     # it is possible to pass some bytes representing a socket
                     # in the file descriptor object on winodws
-                    fdobj = space.text_w(w_fdobj)
+                    fdobj = space.bytes_w(w_fdobj)
                     info_charptr = rffi.str2charp(fdobj)
                     try:
                         info_ptr = rffi.cast(lltype.Ptr(_c.WSAPROTOCOL_INFOW), 
info_charptr)
@@ -215,7 +215,7 @@
                         _c.FROM_PROTOCOL_INFO, info_ptr, 0, 
_c.WSA_FLAG_OVERLAPPED)
                         if fd == rsocket.INVALID_SOCKET:
                             raise converted_error(space, rsocket.last_error())
-                        sock = RSocket(family, type, proto, fd)
+                        sock = RSocket(info_ptr.c_iAddressFamily, 
info_ptr.c_iSocketType, info_ptr.c_iProtocol, fd)
                     finally:
                         lltype.free(info_charptr, flavor='raw')
                 else:
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to