summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-09-11 15:55:48 (GMT)
committerGuido van Rossum <guido@python.org>2002-09-11 15:55:48 (GMT)
commitd4774fb6efde8facccfe0b60a37e3ecd4a943bd9 (patch)
tree2c7134cfec6a7a3bb6c23fc5de0e911a7e955166 /Doc
parent02ff6a99522bf0c734831841661ebd385ae8c417 (diff)
downloadcpython-d4774fb6efde8facccfe0b60a37e3ecd4a943bd9.zip
cpython-d4774fb6efde8facccfe0b60a37e3ecd4a943bd9.tar.gz
cpython-d4774fb6efde8facccfe0b60a37e3ecd4a943bd9.tar.bz2
Untested code for 64-bit platforms. range_length() is declared as int
but returns r->len which is a long. This doesn't even cause a warning on 32-bit platforms, but can return bogus values on 64-bit platforms (and should cause a compiler warning). Fix this by inserting a range check when LONG_MAX != INT_MAX, and adding an explicit cast to (int) when the test passes. When r->len is out of range, PySequence_Size() and hence len() will report an error (but an iterator will still work).
Diffstat (limited to 'Doc')
0 files changed, 0 insertions, 0 deletions