Hotfix Python bindings for 32-bit systems

This commit is contained in:
Anthony MOI
2020-01-08 13:42:26 -05:00
parent 4e7fc93971
commit 988159a998

View File

@ -61,7 +61,8 @@ impl PyMappingProtocol for IndexableString {
}?;
// Find out range from the slice
let PySliceIndices { start, stop, .. } = slice.indices(self.s.len() as i64)?;
let len: std::os::raw::c_long = (self.s.len() as i32) as _;
let PySliceIndices { start, stop, .. } = slice.indices(len)?;
let range = start as usize..stop as usize;
// Get the range from the relevant string