[pypy-commit] pypy win32-cleanup_2: add case for win32, but shouldn't this be true in the general case?

mattip noreply at buildbot.pypy.org
Tue Mar 6 22:24:21 CET 2012


Author: mattip
Branch: win32-cleanup_2
Changeset: r53245:69e1461e351b
Date: 2012-02-27 23:53 +0200
http://bitbucket.org/pypy/pypy/changeset/69e1461e351b/

Log:	add case for win32, but shouldn't this be true in the general case?

diff --git a/pypy/module/_ffi/test/test__ffi.py b/pypy/module/_ffi/test/test__ffi.py
--- a/pypy/module/_ffi/test/test__ffi.py
+++ b/pypy/module/_ffi/test/test__ffi.py
@@ -100,7 +100,10 @@
         from _ffi import CDLL, types
         libm = CDLL(self.libm_name)
         pow_addr = libm.getaddressindll('pow')
-        assert pow_addr == self.pow_addr & (sys.maxint*2-1)
+        fff = sys.maxint*2-1
+        if sys.platform == 'win32':
+            fff = sys.maxint*2+1
+        assert pow_addr == self.pow_addr & fff
 
     def test_func_fromaddr(self):
         import sys


More information about the pypy-commit mailing list