| commit | b8872e61c622e15c68336fcc776e705f904e1e50 | [log] [tgz] |
|---|---|---|
| author | Guido van Rossum <guido@python.org> | Tue May 09 14:14:27 2000 +0000 |
| committer | Guido van Rossum <guido@python.org> | Tue May 09 14:14:27 2000 +0000 |
| tree | 215fff0dff7ca3de6a76769f193b3564cdbd5539 | |
| parent | 2a91cd463ae63ab1e716159d3dac2b8ee923c4c7 [diff] |
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]).