[pypy-svn] r22985 - in pypy/dist/pypy/translator/c: src test

nik at codespeak.net nik at codespeak.net
Fri Feb 3 14:48:40 CET 2006


Author: nik
Date: Fri Feb  3 14:48:33 2006
New Revision: 22985

Modified:
   pypy/dist/pypy/translator/c/src/ll__socket.h
   pypy/dist/pypy/translator/c/test/test_ext__socket.py
Log:
fixed byteorder bug (thanks eric for pushing ;))


Modified: pypy/dist/pypy/translator/c/src/ll__socket.h
==============================================================================
--- pypy/dist/pypy/translator/c/src/ll__socket.h	(original)
+++ pypy/dist/pypy/translator/c/src/ll__socket.h	Fri Feb  3 14:48:33 2006
@@ -173,7 +173,7 @@
     host->refcount--; // XXX this is not sane, but there is no better way
                       // at the moment.
 #endif
-    return ll__socket_sockname(host, addr.sin_port, 0, 0);
+    return ll__socket_sockname(host, ntohs(addr.sin_port), 0, 0);
 }
 
 /* ____________________________________________________________________________ */

Modified: pypy/dist/pypy/translator/c/test/test_ext__socket.py
==============================================================================
--- pypy/dist/pypy/translator/c/test/test_ext__socket.py	(original)
+++ pypy/dist/pypy/translator/c/test/test_ext__socket.py	Fri Feb  3 14:48:33 2006
@@ -131,9 +131,6 @@
         tn.close()
 
     def test_connect(self):
-        import sys
-        if sys.byteorder == 'little':
-            py.test.skip("endian issue on little endian architectures")
         import os
         from pypy.module._socket.rpython import rsocket
         def does_stuff():



More information about the Pypy-commit mailing list