[pypy-svn] r59478 - pypy/trunk/pypy/rlib
arigo at codespeak.net
arigo at codespeak.net
Tue Oct 28 14:59:03 CET 2008
Author: arigo
Date: Tue Oct 28 14:59:03 2008
New Revision: 59478
Modified:
pypy/trunk/pypy/rlib/rsocket.py
Log:
Revert r59475 and use another fix.
Modified: pypy/trunk/pypy/rlib/rsocket.py
==============================================================================
--- pypy/trunk/pypy/rlib/rsocket.py (original)
+++ pypy/trunk/pypy/rlib/rsocket.py Tue Oct 28 14:59:03 2008
@@ -103,11 +103,6 @@
return rffi.cast(lltype.Ptr(TYPE), self.addr_p)
lock._annspecialcase_ = 'specialize:ll'
- def lock_in_addr(self):
- """ Purely abstract
- """
- raise NotImplementedError
-
def unlock(self):
"""To call after we're done with the pointer returned by lock().
Note that locking and unlocking costs nothing at run-time.
@@ -198,6 +193,11 @@
host, serv = getnameinfo(self, NI_NUMERICHOST | NI_NUMERICSERV)
return host
+ def lock_in_addr(self):
+ """ Purely abstract
+ """
+ raise NotImplementedError
+
# ____________________________________________________________
class INETAddress(IPAddress):
@@ -1114,6 +1114,7 @@
def gethostbyaddr(ip):
# XXX use gethostbyaddr_r() if available, and/or use locks if not
addr = makeipaddr(ip)
+ assert isinstance(addr, IPAddress)
p, size = addr.lock_in_addr()
try:
hostent = _c.gethostbyaddr(p, size, addr.family)
More information about the Pypy-commit
mailing list