pyo3::internal_tricks

Function get_ssize_index

Source
pub(crate) fn get_ssize_index(index: usize) -> Py_ssize_t
Expand description

Convert an usize index into a Py_ssize_t index, clamping overflow to PY_SSIZE_T_MAX.

⚠️ Internal Docs ⚠️ Not Public API 👉 Official Docs Here