mirror of
https://github.com/pybind/pybind11.git
synced 2025-01-31 15:20:34 +00:00
cf0d0f9d5a
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 |