Staging
v0.5.1
swh:1:snp:635f4099902912592851108bcac178ff574f7c5f
Revision 3906eb877a7010dae5faf7ff2d48634d56ed5ec2 authored by Tim Peters on 10 April 2001, 04:22:00 UTC, committed by Tim Peters on 10 April 2001, 04:22:00 UTC
pickled into the signed(!) 4-byte BININT format, so were getting unpickled
again as negative ints.  Repaired that.
Added some minimal docs at the top about what I've learned about the pickle
format codes (little of which was obvious from staring at the code,
although that's partly because all the size-related bugs greatly obscured
the true intent of the code).
Happy side effect:  because save_int() needed to grow a *proper* range
check in order to fix this bug, it can now use the more-efficient BININT1,
BININT2 and BININT formats when the long's value is small enough to fit
in a signed 4-byte int (before this, on a sizeof(long)==8 box it always
used the general INT format for negative ints).
test_cpickle works again on sizeof(long)==8 machines.  test_pickle is
still busted big-time.
1 parent e089c68
History
Tip revision: 550e4673be538d98b6ddf5550b3922539cf5c4b2 authored by Victor Stinner on 08 December 2020, 23:32:54 UTC
bpo-32381: Add _PyRun_SimpleFileObject() (GH-23709)
Tip revision: 550e467
File Mode Size
Demo
Doc
Grammar
Include
Lib
Mac
Misc
Modules
Objects
PC
PCbuild
Parser
Python
RISCOS
Tools
.cvsignore -rw-r--r-- 79 bytes
.hgtags -rw-r--r-- 1.9 KB
LICENSE -rw-r--r-- 9.2 KB
Makefile.pre.in -rw-r--r-- 21.7 KB
README -rw-r--r-- 37.9 KB
acconfig.h -rw-r--r-- 6.0 KB
config.h.in -rw-r--r-- 16.5 KB
configure -rwxr-xr-x 176.9 KB
configure.in -rw-r--r-- 35.9 KB
install-sh -rwxr-xr-x 5.5 KB
setup.py -rw-r--r-- 24.5 KB

README

back to top