Author: Richard Plangger <[email protected]>
Branch: 
Changeset: r88968:dfe709b1b9c3
Date: 2016-12-08 14:03 +0100
http://bitbucket.org/pypy/pypy/changeset/dfe709b1b9c3/

Log:    rpython/rlib/rsocket.py modification to allow bytearray to be passed
        as argument

diff --git a/rpython/rlib/rsocket.py b/rpython/rlib/rsocket.py
--- a/rpython/rlib/rsocket.py
+++ b/rpython/rlib/rsocket.py
@@ -398,7 +398,7 @@
             baseofs = offsetof(_c.sockaddr_un, 'c_sun_path')
             self.setdata(sun, baseofs + len(path))
             rffi.setintfield(sun, 'c_sun_family', AF_UNIX)
-            if _c.linux and path.startswith('\x00'):
+            if _c.linux and path[0] == '\x00':
                 # Linux abstract namespace extension
                 if len(path) > sizeof(_c.sockaddr_un.c_sun_path):
                     raise RSocketError("AF_UNIX path too long")
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to