]> granicus.if.org Git - python/commit
Fix a couple of bugs exposed by the new __index__ code. The 64-bit buildbots
authorNeal Norwitz <nnorwitz@gmail.com>
Sat, 12 Aug 2006 18:44:06 +0000 (18:44 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Sat, 12 Aug 2006 18:44:06 +0000 (18:44 +0000)
commit1872b1c01f343f4cbfa7696ce95beae8278ce210
tree382d8080c87b1484d3449b9108f65b023ccdaef8
parent8a87f5d37e6aab91ddc4c6491877b6cbd48a12cf
Fix a couple of bugs exposed by the new __index__ code.  The 64-bit buildbots
were failing due to inappropriate clipping of numbers larger than 2**31
with new-style classes. (typeobject.c)  In reviewing the code for classic
classes, there were 2 problems.  Any negative value return could be returned.
Always return -1 if there was an error.  Also make the checks similar
with the new-style classes.  I believe this is correct for 32 and 64 bit
boxes, including Windows64.

Add a test of classic classes too.
Lib/test/test_index.py
Misc/NEWS
Objects/classobject.c
Objects/typeobject.c