cpython/Objects
Guido van Rossum c682140de7 Trent Mick:
Fix the string methods that implement slice-like semantics with
optional args (count, find, endswith, etc.) to properly handle
indeces outside [INT_MIN, INT_MAX]. Previously the "i" formatter
for PyArg_ParseTuple was used to get the indices. These could overflow.

This patch changes the string methods to use the "O&" formatter with
the slice_index() function from ceval.c which is used to do the same
job for Python code slices (e.g. 'abcabcabc'[0:1000000000L]). slice_index()
is renamed _PyEval_SliceIndex() and is now exported. As well, the return
values for success/fail were changed to make slice_index directly
usable as required by the "O&" formatter.

[GvR: shouldn't a similar patch be applied to unicodeobject.c?]
2000-05-08 14:08:05 +00:00
..
.cvsignore Ignore a bunch of generated files. 2000-05-02 18:34:30 +00:00
Makefile.in Marc-AAndre Lemburg: add new unicode files 2000-03-10 22:55:40 +00:00
abstract.c Marc-Andre's third try at this bulk patch seems to work (except that 2000-04-05 20:11:21 +00:00
bufferobject.c Vladimir Marangozov's long-awaited malloc restructuring. 2000-05-03 23:44:39 +00:00
classobject.c Vladimir Marangozov's long-awaited malloc restructuring. 2000-05-03 23:44:39 +00:00
cobject.c Vladimir Marangozov's long-awaited malloc restructuring. 2000-05-03 23:44:39 +00:00
complexobject.c Vladimir Marangozov's long-awaited malloc restructuring. 2000-05-03 23:44:39 +00:00
dictobject.c Vladimir Marangozov's long-awaited malloc restructuring. 2000-05-03 23:44:39 +00:00
fileobject.c Vladimir Marangozov's long-awaited malloc restructuring. 2000-05-03 23:44:39 +00:00
floatobject.c Vladimir Marangozov's long-awaited malloc restructuring. 2000-05-03 23:44:39 +00:00
frameobject.c Vladimir Marangozov's long-awaited malloc restructuring. 2000-05-03 23:44:39 +00:00
funcobject.c Vladimir Marangozov's long-awaited malloc restructuring. 2000-05-03 23:44:39 +00:00
intobject.c Vladimir Marangozov's long-awaited malloc restructuring. 2000-05-03 23:44:39 +00:00
listobject.c Vladimir Marangozov's long-awaited malloc restructuring. 2000-05-03 23:44:39 +00:00
longobject.c Vladimir Marangozov's long-awaited malloc restructuring. 2000-05-03 23:44:39 +00:00
methodobject.c Vladimir Marangozov's long-awaited malloc restructuring. 2000-05-03 23:44:39 +00:00
moduleobject.c Vladimir Marangozov's long-awaited malloc restructuring. 2000-05-03 23:44:39 +00:00
object.c Vladimir Marangozov's long-awaited malloc restructuring. 2000-05-03 23:44:39 +00:00
rangeobject.c Vladimir Marangozov's long-awaited malloc restructuring. 2000-05-03 23:44:39 +00:00
sliceobject.c Vladimir Marangozov's long-awaited malloc restructuring. 2000-05-03 23:44:39 +00:00
stringobject.c Trent Mick: 2000-05-08 14:08:05 +00:00
tupleobject.c Vladimir Marangozov's long-awaited malloc restructuring. 2000-05-03 23:44:39 +00:00
typeobject.c American spelling in doc string. 1997-06-02 14:43:07 +00:00
unicodectype.c Marc-Andre Lemburg: 2000-04-11 15:39:02 +00:00
unicodeobject.c Mark Hammond should get his act into gear (his words :-). Zero length 2000-05-04 15:52:20 +00:00
xxobject.c Vladimir Marangozov's long-awaited malloc restructuring. 2000-05-03 23:44:39 +00:00