[pypy-svn] r46735 - in pypy/dist/pypy/rlib: . test

arigo at codespeak.net arigo at codespeak.net
Wed Sep 19 16:45:11 CEST 2007


Author: arigo
Date: Wed Sep 19 16:45:11 2007
New Revision: 46735

Added:
   pypy/dist/pypy/rlib/rsocket_rffi.py
      - copied, changed from r46707, pypy/dist/pypy/rlib/rsocket.py
   pypy/dist/pypy/rlib/test/test_rsocket_rffi.py
      - copied, changed from r46700, pypy/dist/pypy/rlib/test/test_rsocket.py
Modified:
   pypy/dist/pypy/rlib/_rsocket_rffi.py
Log:
Starting a version of rsocket based on _rsocket_rffi.


Modified: pypy/dist/pypy/rlib/_rsocket_rffi.py
==============================================================================
--- pypy/dist/pypy/rlib/_rsocket_rffi.py	(original)
+++ pypy/dist/pypy/rlib/_rsocket_rffi.py	Wed Sep 19 16:45:11 2007
@@ -376,7 +376,9 @@
     fd_set = cConfig.fd_set
 
 #c_int_size = sizeof(rffi.INT)
-external = rffi.llexternal
+def external(*args, **kwds):
+    kwds.setdefault('stringpolicy', 'fullauto')
+    return rffi.llexternal(*args, **kwds)
 
 if _POSIX:
     strerror = external('strerror', [rffi.INT], CCHARP)
@@ -396,7 +398,8 @@
 
 if not MS_WINDOWS:
     getaddrinfo = external('getaddrinfo', [CCHARP, CCHARP,
-                            addrinfo_ptr, rffi.CArray(addrinfo_ptr)], rffi.INT)
+                            addrinfo_ptr,
+                            lltype.Ptr(rffi.CArray(addrinfo_ptr))], rffi.INT)
     freeaddrinfo = external('freeaddrinfo', [addrinfo_ptr], lltype.Void)
     getnameinfo = external('getnameinfo', [sockaddr_ptr, socklen_t, CCHARP,
                            size_t, CCHARP, size_t, rffi.INT], rffi.INT)



More information about the Pypy-commit mailing list