Author: mattip <[email protected]>
Branch: missing-ndarray-attributes
Changeset: r60876:c5931fbe51ca
Date: 2013-02-04 23:10 +0200
http://bitbucket.org/pypy/pypy/changeset/c5931fbe51ca/
Log: Backed out changeset: e5ee474dc98a - not related to this branch
diff --git a/rpython/rlib/rsocket.py b/rpython/rlib/rsocket.py
--- a/rpython/rlib/rsocket.py
+++ b/rpython/rlib/rsocket.py
@@ -704,16 +704,14 @@
return err
if hasattr(_c, 'dup'):
- def dup(self, SocketClass):
- #def dup(self, SocketClass=None):
- #if SocketClass is None:
- # SocketClass = RSocket
- # assert SocketClass is not None
+ def dup(self, SocketClass=None):
+ if SocketClass is None:
+ SocketClass = RSocket
fd = _c.dup(self.fd)
if fd < 0:
raise self.error_handler()
return make_socket(fd, self.family, self.s_type, self.proto,
- SocketClass)
+ SocketClass=SocketClass)
def getpeername(self):
"""Return the address of the remote endpoint."""
@@ -956,7 +954,7 @@
# ____________________________________________________________
-def make_socket(fd, family, s_type, proto, SocketClass):
+def make_socket(fd, family, s_type, proto, SocketClass=RSocket):
result = instantiate(SocketClass)
result.fd = fd
result.family = family
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit