Commit c9de882
committed
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.1 parent 2592e57 commit c9de882
4 files changed
Lines changed: 25 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
184 | | - | |
185 | | - | |
| 184 | + | |
| 185 | + | |
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
198 | 205 | | |
199 | 206 | | |
200 | 207 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
15 | 21 | | |
16 | 22 | | |
17 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
974 | 974 | | |
975 | 975 | | |
976 | 976 | | |
977 | | - | |
978 | | - | |
| 977 | + | |
| 978 | + | |
979 | 979 | | |
980 | 980 | | |
981 | 981 | | |
982 | | - | |
983 | | - | |
| 982 | + | |
984 | 983 | | |
985 | | - | |
| 984 | + | |
986 | 985 | | |
987 | 986 | | |
988 | 987 | | |
989 | 988 | | |
990 | 989 | | |
991 | 990 | | |
992 | | - | |
| 991 | + | |
993 | 992 | | |
994 | 993 | | |
| 994 | + | |
| 995 | + | |
995 | 996 | | |
996 | 997 | | |
997 | 998 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4110 | 4110 | | |
4111 | 4111 | | |
4112 | 4112 | | |
4113 | | - | |
4114 | 4113 | | |
4115 | 4114 | | |
4116 | 4115 | | |
4117 | 4116 | | |
4118 | | - | |
4119 | | - | |
| 4117 | + | |
4120 | 4118 | | |
4121 | 4119 | | |
4122 | 4120 | | |
4123 | | - | |
| 4121 | + | |
4124 | 4122 | | |
4125 | | - | |
| 4123 | + | |
4126 | 4124 | | |
4127 | 4125 | | |
4128 | 4126 | | |
| |||
0 commit comments