pybind11/include/pybind11/detail
Ralf W. Grosse-Kunstleve 777352fcd1
Adding ssize_t_cast to support passing size_t or ssize_t values where ssize_t is needed. (#3219)
* Trivial change to avoid (ssize_t) cast.

* Demo for safe_ssize_t idea.

* Removing safe_ssize_t.cpp (proof-of-concept code) to not upset the GHA Format workflow.

* Completing changes in pytypes.h

* New ssize_t_cast (better replacement for safe_ssize_t).

* clang-format-diff (no manual changes).

* bytes_ssize_t -Wnarrowing reproducer (see PR #2692).

* Backing out tuple(), list() ssize_t support, for compatibility with older compilers (to resolve link failures).

* Bug fix: missing `py::` for `py::ssize_t`

* Restoring tuple(), list() ssize_t support, but passing `size` by value, for compatibility with older compilers (to resolve link failures).

* Full test coverage of all functions with modified signatures.
2021-08-28 16:40:46 -07:00
..
class.h maint(clang-tidy): Improve code readability with explicit boolean casts (#3148) 2021-07-27 15:32:26 -07:00
common.h Adding ssize_t_cast to support passing size_t or ssize_t values where ssize_t is needed. (#3219) 2021-08-28 16:40:46 -07:00
descr.h Removing MSVC C4100 from pragma block at the top of pybind11.h (#3150) 2021-07-28 17:01:21 -07:00
init.h Removing MSVC C4127 from pragma block at the top of pybind11.h (#3152) 2021-07-30 11:25:29 -07:00
internals.h PYBIND11_NOINLINE-related cleanup. (#3179) 2021-08-09 10:10:38 -07:00
type_caster_base.h [Bugfix] Fix errant const methods (#3194) 2021-08-14 12:25:54 -04:00
typeid.h PYBIND11_NOINLINE-related cleanup. (#3179) 2021-08-09 10:10:38 -07:00