[pypy-svn] r78005 - pypy/trunk/pypy/module/cpyext/test

arigo at codespeak.net arigo at codespeak.net
Fri Oct 15 19:03:29 CEST 2010


Author: arigo
Date: Fri Oct 15 19:03:28 2010
New Revision: 78005

Modified:
   pypy/trunk/pypy/module/cpyext/test/test_unicodeobject.py
Log:
64-bit fix.


Modified: pypy/trunk/pypy/module/cpyext/test/test_unicodeobject.py
==============================================================================
--- pypy/trunk/pypy/module/cpyext/test/test_unicodeobject.py	(original)
+++ pypy/trunk/pypy/module/cpyext/test/test_unicodeobject.py	Fri Oct 15 19:03:28 2010
@@ -177,13 +177,14 @@
             encoded_charp = rffi.str2charp(encoded)
             strict_charp = rffi.str2charp("strict")
             if endian is not None:
-                pendian = lltype.malloc(rffi.INTP.TO, 1, flavor='raw')
                 if endian < 0:
-                    pendian[0] = -1
+                    value = -1
                 elif endian > 0:
-                    pendian[0] = 1
+                    value = 1
                 else:
-                    pendian[0] = 0
+                    value = 0
+                pendian = lltype.malloc(rffi.INTP.TO, 1, flavor='raw')
+                pendian[0] = rffi.cast(rffi.INT, value)
             else:
                 pendian = None
 



More information about the Pypy-commit mailing list