Yannick Jadoul 0bb8ca2639
Always call PyNumber_Index when casting from Python to a C++ integral type, also pre-3.8 (#2801)
* Always call PyNumber_Index when casting from Python to a C++ integral type, also pre-3.8

* Fixed on PyPy

* Simplify use of PyNumber_Index, following @rwgk's idea, and ignore warnings in >=3.8

* Reproduce mismatch between pre-3.8 and post-3.8 behavior on __index__ throwing TypeError

* Fix tests on 3.6 <= Python < 3.8

* No, I don't have an uninitialized variable

* Fix use of __index__ on Python 2

* Make types in test_int_convert more ~boring~ descriptive
2021-01-25 21:05:17 +01:00
..
2020-08-20 11:58:34 -04:00
2017-01-31 17:05:44 +01:00
2020-10-15 17:38:49 -04:00
2020-07-26 09:25:27 -04:00
2020-11-19 12:09:33 +01:00
2020-11-19 12:09:33 +01:00