Issue #5260: Various portability and standards compliance fixes, optimizations
and cleanups in Objects/longobject.c. The most significant change is that
longs now use less memory: average savings are 2 bytes per long on 32-bit
systems and 6 bytes per long on 64-bit systems. (This memory saving already
exists in py3k.)
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py
index bd819c6..128880d 100644
--- a/Lib/test/test_sys.py
+++ b/Lib/test/test_sys.py
@@ -593,12 +593,12 @@
# listreverseiterator (list)
check(reversed([]), size(h + 'lP'))
# long
- check(0L, size(vh + 'H') - self.H)
- check(1L, size(vh + 'H'))
- check(-1L, size(vh + 'H'))
- check(32768L, size(vh + 'H') + self.H)
- check(32768L*32768L-1, size(vh + 'H') + self.H)
- check(32768L*32768L, size(vh + 'H') + 2*self.H)
+ check(0L, size(vh))
+ check(1L, size(vh) + self.H)
+ check(-1L, size(vh) + self.H)
+ check(32768L, size(vh) + 2*self.H)
+ check(32768L*32768L-1, size(vh) + 2*self.H)
+ check(32768L*32768L, size(vh) + 3*self.H)
# module
check(unittest, size(h + 'P'))
# None