mirror of
https://github.com/pybind/pybind11.git
synced 2025-03-03 13:03:20 +00:00
Pybind11's default conversion to int always produces a long on Python 2 (`int`s and `long`s were unified in Python 3). This patch fixes `int` handling to match Python 2 on Python 2; for short types (`size_t` or smaller), the number will be returned as an `int` if possible, otherwise `long`. Requires Python 2.5+. This is needed for things like `sys.exit`, which refuse to accept a `long`. |
||
---|---|---|
.. | ||
pybind11 |