Alexander Belopolsky <[EMAIL PROTECTED]> added the comment:

On Fri, Apr 25, 2008 at 5:31 PM, Benjamin Peterson
<[EMAIL PROTECTED]> wrote:
>  Comments?

In the range_hash function, len, start, step locals should be declared
Py_ssize_t, not long. Also, you can use range_length() instead of
PyObject_Size() and you need to clear error if you get len == -1.

See issue2690. With your patch,

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OverflowError: Python int too large to convert to C ssize_t

but

True

You can avoid this problem by using range_length_obj instead of
PyObject_Size in range_richcompare.

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2603>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to