-
Notifications
You must be signed in to change notification settings - Fork 804
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change the type of length from c_long to isize (in PySlice::index) #3756
Comments
Agreed, a PR to fix this would be greatly appreciated 👍 |
That said, I assume the length should be non-negative? Maybe |
Agree!. And if more changes are allowed, I propose to further change the type of start/stop/length of |
I'm certainly open to making those changes to fit better with what Python offers, but we should consider the compatibility story. There's a lot changing in 0.21 already and I'm cautious of adding too much more. |
This change is already a break change, but I will try to make the changes small, when I create the PR probably this or next week. |
pyo3/src/types/slice.rs
Line 69 in 3af73fa
The underlying function
PySlice_GetIndicesEx
has an inputlength
of typePy_ssize_t
, which should be mapped toisize
, instead ofc_long
. The conversion fromc_long
toPy_ssize_t
seems unnecessary.The text was updated successfully, but these errors were encountered: