cpython/Objects
Tim Peters ee1a53cbb1 cPickle.c: Full support for the new LONG1 and LONG4. Added comments.
Assorted code cleanups; e.g., sizeof(char) is 1 by definition, so there's
no need to do things like multiply by sizeof(char) in hairy malloc
arguments.  Fixed an undetected-overflow bug in readline_file().

longobject.c:  Fixed a really stupid bug in the new _PyLong_NumBits.

pickle.py:  Fixed stupid bug in save_long():  When proto is 2, it
wrote LONG1 or LONG4, but forgot to return then -- it went on to
append the proto 1 LONG opcode too.
Fixed equally stupid cancelling bugs in load_long1() and
load_long4():  they *returned* the unpickled long instead of pushing
it on the stack.  The return values were ignored.  Tests passed
before only because save_long() pickled the long twice.

Fixed bugs in encode_long().

Noted that decode_long() is quadratic-time despite our hopes,
because long(string, 16) is still quadratic-time in len(string).
It's hex() that's linear-time.  I don't know a way to make decode_long()
linear-time in Python, short of maybe transforming the 256's-complement
bytes into marshal's funky internal format, and letting marshal decode
that.  It would be more valuable to make long(string, 16) linear time.

pickletester.py:  Added a global "protocols" vector so tests can try
all the protocols in a sane way.  Changed test_ints() and test_unicode()
to do so.  Added a new test_long(), but the tail end of it is disabled
because it "takes forever" under pickle.py (but runs very quickly under
cPickle:  cPickle proto 2 for longs is linear-time).
2003-02-02 02:57:53 +00:00
..
.cvsignore Ignore a bunch of generated files. 2000-05-02 18:34:30 +00:00
abstract.c Merge to trunk from release branch: 2002-12-31 19:50:03 +00:00
boolobject.c Make more functions static 2002-08-06 22:12:52 +00:00
bufferobject.c Call me anal, but there was a particular phrase that was speading to 2002-08-19 19:26:42 +00:00
cellobject.c Use new GC API. 2001-08-29 23:54:21 +00:00
classobject.c SF patch #659536: Use PyArg_UnpackTuple where possible. 2002-12-29 16:33:45 +00:00
cobject.c Patch #568124: Add doc string macros. 2002-06-13 20:33:02 +00:00
complexobject.c Implement appropriate __getnewargs__ for all immutable subclassable builtin 2003-01-29 17:58:45 +00:00
descrobject.c SF patch #659536: Use PyArg_UnpackTuple where possible. 2002-12-29 16:33:45 +00:00
dictobject.c SF patch #659536: Use PyArg_UnpackTuple where possible. 2002-12-29 16:33:45 +00:00
enumobject.c Remove the next() method -- one is supplied automatically by 2002-07-16 21:02:42 +00:00
fileobject.c Allow PyFile_GetLine() to return Unicode objects. Fixes #660165. 2003-01-03 19:16:14 +00:00
floatobject.c Implement appropriate __getnewargs__ for all immutable subclassable builtin 2003-01-29 17:58:45 +00:00
frameobject.c Since the *_Init() are private, prefix with _, suggested by Skip 2002-12-31 03:42:13 +00:00
funcobject.c Provide __module__ attributes for functions defined in C and Python. 2003-01-31 18:33:18 +00:00
intobject.c Implement appropriate __getnewargs__ for all immutable subclassable builtin 2003-01-29 17:58:45 +00:00
iterobject.c Squash a few calls to the hideously expensive PyObject_CallObject(o,a) 2002-08-16 17:01:09 +00:00
listobject.c Allow list sort's comparison function to explicitly be None. See SF patch 2003-01-02 20:51:08 +00:00
listsort.txt Fixed new typos, added a little info about ~sort versus "hint"s. 2002-08-10 07:04:01 +00:00
longobject.c cPickle.c: Full support for the new LONG1 and LONG4. Added comments. 2003-02-02 02:57:53 +00:00
methodobject.c Provide __module__ attributes for functions defined in C and Python. 2003-01-31 18:33:18 +00:00
moduleobject.c Patch #568124: Add doc string macros. 2002-06-13 20:33:02 +00:00
object.c Recursive compare machinery: The code that intended to exempt tuples 2003-01-20 16:54:59 +00:00
obmalloc.c Remove MALLOC_ZERO_RETURNS_NULL. 2002-11-23 09:13:40 +00:00
rangeobject.c Update comments about the performance of xrange(). 2002-12-11 07:14:03 +00:00
sliceobject.c SF patch #659536: Use PyArg_UnpackTuple where possible. 2002-12-29 16:33:45 +00:00
stringobject.c Implement appropriate __getnewargs__ for all immutable subclassable builtin 2003-01-29 17:58:45 +00:00
structseq.c Removed all uses of the out-of-favor __safe_for_unpickling__ magic 2003-02-01 02:16:37 +00:00
tupleobject.c Implement appropriate __getnewargs__ for all immutable subclassable builtin 2003-01-29 17:58:45 +00:00
typeobject.c Fix for SF bug #642358: only provide a new with a __dict__ or 2003-01-07 13:41:37 +00:00
unicodectype.c Make lower/upper/title work for non-BMP characters. 2002-10-18 16:40:36 +00:00
unicodeobject.c Change the treatment of positions returned by PEP293 2003-01-31 17:19:08 +00:00
unicodetype_db.h Add unidata_version. Bump generator version number. 2002-11-25 09:13:37 +00:00
weakrefobject.c Add support for the iterator protocol to weakref proxy objects. 2002-08-09 18:34:16 +00:00
xxobject.c Grammatical fix in comment. 2003-01-03 21:22:08 +00:00