Message104743
A couple of suggestions regarding the patch:
(1) I'd suggest leaving the first part of handle_range_longs intact, up to and including the "/* ilow and ihigh correct now; do istep */" block. Then build out the three "if (!PyInt_Check(...)) ..." blocks below to include argument conversion. I think the patch would look cleaner this way.
(2) Rather than using PyNumber_Long, I'd prefer an explicit check for, and call to, nb_int. This is the behaviour that's used for the 'l' getargs format. PyNumber_Long is considerably more complicated, and involves looking at __trunc__ and __long__; so if you use PyNumber_Long you'll still end up with inconsistent behaviour between small and large arguments. |
|
Date |
User |
Action |
Args |
2010-05-01 20:03:10 | mark.dickinson | set | recipients:
+ mark.dickinson, loewis, rhettinger, belopolsky, christian.heimes, josm, robertwb, zanella, akitada |
2010-05-01 20:03:09 | mark.dickinson | set | messageid: <1272744189.72.0.355962487887.issue1533@psf.upfronthosting.co.za> |
2010-05-01 20:03:08 | mark.dickinson | link | issue1533 messages |
2010-05-01 20:03:07 | mark.dickinson | create | |
|