cpython/Objects
Tim Peters 8d9eb10c29 Armin asked for a list_ass_slice review in his checkin, so here's the
result.

list_resize():  Document the intent.  Code is increasingly relying on
subtle aspects of its behavior, and they deserve to be spelled out.

list_ass_slice():  A bit more simplification, by giving it a common
error exit and initializing more values.

Be clearer in comments about what "size" means (# of elements?  # of
bytes?).

While the number of elements in a list slice must fit in an int, there's
no guarantee that the number of bytes occupied by the slice will.  That
malloc() and memmove() take size_t arguments is a hint about that <wink>.
So changed to use size_t where appropriate.

ihigh - ilow should always be >= 0, but we never asserted that.  We do
now.

The loop decref'ing the recycled slice had a subtle insecurity:  C doesn't
guarantee that a pointer one slot *before* an array will compare "less
than" to a pointer within the array (it does guarantee that a pointer
one beyond the end of the array compares as expected).  This was actually
an issue in KSR's C implementation, so isn't purely theoretical.  Python
probably has other "go backwards" loops with a similar glitch.
list_clear() is OK (it marches an integer backwards, not a pointer).
2004-07-31 02:24:20 +00:00
..
.cvsignore Ignore a bunch of generated files. 2000-05-02 18:34:30 +00:00
abstract.c Check the type of values returned by __int__, __float__, __long__, 2004-07-19 16:29:17 +00:00
boolobject.c - bool() called without arguments now returns False rather than 2003-04-19 18:15:10 +00:00
bufferobject.c Correct code to advance ptr to be well-formed C. 2004-03-25 16:16:28 +00:00
cellobject.c Use new GC API. 2001-08-29 23:54:21 +00:00
classobject.c - When method objects have an attribute that can be satisfied either 2003-11-22 23:55:50 +00:00
cobject.c Make CObjects mutable. Fixes #477441. 2003-10-19 18:30:01 +00:00
complexobject.c Patch #774665: Make Python LC_NUMERIC agnostic. 2004-06-08 18:52:54 +00:00
descrobject.c Use PyDict_Contains() instead of PySequence_Contains(). 2003-12-13 11:58:56 +00:00
dictnotes.txt Fix typos and add some elaborations 2004-03-15 15:52:22 +00:00
dictobject.c Moved SunPro warning suppression into pyport.h and out of individual 2004-07-15 15:54:05 +00:00
enumobject.c * Add unittests for iterators that report their length 2004-04-12 18:10:01 +00:00
fileobject.c dump HAVE_FOPENRF stuff - obsolete 2004-06-11 04:49:03 +00:00
floatobject.c Fix a couple of signed/unsigned comparison warnings 2004-07-08 01:55:58 +00:00
frameobject.c SF Bug #215126: Over restricted type checking on eval() function 2004-07-02 06:41:07 +00:00
funcobject.c Remove unused macros in .c files 2004-07-08 01:49:00 +00:00
genobject.c Patch #966493: Cleanup generator/eval_frame exposure. 2004-06-27 15:43:12 +00:00
intobject.c Check the type of values returned by __int__, __float__, __long__, 2004-07-19 16:29:17 +00:00
iterobject.c * Add unittests for iterators that report their length 2004-04-12 18:10:01 +00:00
listobject.c Armin asked for a list_ass_slice review in his checkin, so here's the 2004-07-31 02:24:20 +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 SF patch 703666: Several objects don't decref tmp on failure in subtype_new 2003-06-28 20:04:25 +00:00
methodobject.c * Added a new method flag, METH_COEXIST. 2003-12-13 11:26:12 +00:00
moduleobject.c Remove code that tried to warn about shadowing builtin names after a 2003-07-16 22:04:11 +00:00
object.c Remove unused macros in .c files 2004-07-08 01:49:00 +00:00
obmalloc.c whoops, I wanted that commented out by default, will add doc to Misc 2004-06-06 19:21:34 +00:00
rangeobject.c Tidied up the implementations of reversed (including the custom ones 2004-03-10 10:10:42 +00:00
setobject.c Moved SunPro warning suppression into pyport.h and out of individual 2004-07-15 15:54:05 +00:00
sliceobject.c SF bug #800796: Difference between hash() and __hash__() 2003-09-05 14:27:30 +00:00
stringobject.c .encode()/.decode() patch part 2. 2004-07-08 19:13:55 +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 Add a final permutation step to the tuple hash function. 2004-06-10 18:42:15 +00:00
typeobject.c Cosmetic spacing fix. 2004-06-25 22:24:35 +00:00
unicodectype.c - SF #962502: Add two more methods for unicode type; width() and 2004-06-02 16:49:17 +00:00
unicodeobject.c Let u'%s' % obj try obj.__unicode__() first and fallback to obj.__str__(). 2004-07-23 16:13:25 +00:00
unicodetype_db.h - SF #962502: Add two more methods for unicode type; width() and 2004-06-02 16:49:17 +00:00
weakrefobject.c SF bug #978308, Spurious errors taking bool of dead pro 2004-07-08 01:22:31 +00:00