• Tim Peters's avatar
    On a sizeof(long)==8 machine, ints in range(2**31, 2**32) were getting · 3906eb87
    Tim Peters yazdı
    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.
    3906eb87
Adı
Son kayıt (commit)
Son güncelleme
Demo Loading commit data...
Doc Loading commit data...
Grammar Loading commit data...
Include Loading commit data...
Lib Loading commit data...
Mac Loading commit data...
Misc Loading commit data...
Modules Loading commit data...
Objects Loading commit data...
PC Loading commit data...
PCbuild Loading commit data...
Parser Loading commit data...
Python Loading commit data...
RISCOS Loading commit data...
Tools Loading commit data...
.cvsignore Loading commit data...
.hgtags Loading commit data...
LICENSE Loading commit data...
Makefile.pre.in Loading commit data...
README Loading commit data...
acconfig.h Loading commit data...
config.h.in Loading commit data...
configure Loading commit data...
configure.in Loading commit data...
install-sh Loading commit data...
setup.py Loading commit data...