Author: Antonio Cuni <[email protected]>
Branch: ffistruct
Changeset: r49002:879029fb8b50
Date: 2011-11-09 10:02 +0100
http://bitbucket.org/pypy/pypy/changeset/879029fb8b50/
Log: make sure that we correctly handle the app-level-long to interp-
level-slong conversion
diff --git a/pypy/module/_ffi/test/test_struct.py
b/pypy/module/_ffi/test/test_struct.py
--- a/pypy/module/_ffi/test/test_struct.py
+++ b/pypy/module/_ffi/test/test_struct.py
@@ -132,10 +132,10 @@
struct = descr.allocate()
struct.setfield('sbyte', 128)
struct.setfield('sint', 43)
- struct.setfield('slong', 44)
+ struct.setfield('slong', sys.maxint+1)
assert struct.getfield('sbyte') == -128
assert struct.getfield('sint') == 43
- assert struct.getfield('slong') == 44
+ assert struct.getfield('slong') == -sys.maxint-1
def test_compute_shape(self):
from _ffi import Structure, Field, types
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit