[pypy-svn] r26721 - pypy/dist/pypy/module/_socket

ale at codespeak.net ale at codespeak.net
Wed May 3 13:54:15 CEST 2006


Author: ale
Date: Wed May  3 13:54:14 2006
New Revision: 26721

Modified:
   pypy/dist/pypy/module/_socket/interp_socket.py
Log:
Small bugfixes - still it does not translate

Modified: pypy/dist/pypy/module/_socket/interp_socket.py
==============================================================================
--- pypy/dist/pypy/module/_socket/interp_socket.py	(original)
+++ pypy/dist/pypy/module/_socket/interp_socket.py	Wed May  3 13:54:14 2006
@@ -628,9 +628,9 @@
         except:
             _c.freeaddrinfo(res)
             raise
-    res = space.newlist(result)
+    result = space.newlist(result)
     _c.freeaddrinfo(res)
-    return res
+    return result
 getaddrinfo.unwrap_spec = [ObjSpace, W_Root, W_Root, int, int, int, int]
 
 def getnameinfo(space, w_sockaddr, flags):
@@ -675,9 +675,10 @@
 
     hostbuf = ctypes.create_string_buffer(_c.NI_MAXHOST)
     portbuf = ctypes.create_string_buffer(_c.NI_MAXSERV)
+    maxhost = _c.size_t(_c.NI_MAXHOST)
     error = _c.getnameinfo(res.contents.ai_addr, res.contents.ai_addrlen,
-                        hostbuf, _c.NI_MAXHOST,
-                        portbuf, _c.NI_MAXSERV, flags)
+                        hostbuf, maxhost,
+                        portbuf, _c.size_t(_c.NI_MAXSERV), flags)
 
     if res:
         _c.freeaddrinfo(res)



More information about the Pypy-commit mailing list