Source

pypy / pypy / module / _ffi / test / test_struct.py

Diff from to

pypy/module/_ffi/test/test_struct.py

         assert struct.getfield('sshort') == -32768
         struct.setfield('sint', 43)
         assert struct.getfield('sint') == 43
-        struct.setfield('slong', sys.maxint+1)
-        assert struct.getfield('slong') == -sys.maxint-1
-        struct.setfield('slong', sys.maxint*3)
-        assert struct.getfield('slong') == sys.maxint-2
+        struct.setfield('slong', sys.maxsize+1)
+        assert struct.getfield('slong') == -sys.maxsize-1
+        struct.setfield('slong', sys.maxsize*3)
+        assert struct.getfield('slong') == sys.maxsize-2
 
     def test_getfield_setfield_unsigned_types(self):
         import sys
         struct.setfield('uint', 43)
         assert struct.getfield('uint') == 43
         struct.setfield('ulong', -1)
-        assert struct.getfield('ulong') == sys.maxint*2 + 1
-        struct.setfield('ulong', sys.maxint*2 + 2)
+        assert struct.getfield('ulong') == sys.maxsize*2 + 1
+        struct.setfield('ulong', sys.maxsize*2 + 2)
         assert struct.getfield('ulong') == 0
         struct.setfield('char', 'a')
         assert struct.getfield('char') == 'a'
-        struct.setfield('unichar', u'\u1234')
-        assert struct.getfield('unichar') == u'\u1234'
+        struct.setfield('unichar', '\u1234')
+        assert struct.getfield('unichar') == '\u1234'
         struct.setfield('ptr', -1)
-        assert struct.getfield('ptr') == sys.maxint*2 + 1
+        assert struct.getfield('ptr') == sys.maxsize*2 + 1
     
     def test_getfield_setfield_longlong(self):
         import sys