Skip to content

Commit

Permalink
Hotfix Python bindings for 32-bit systems
Browse files Browse the repository at this point in the history
  • Loading branch information
n1t0 committed Jan 8, 2020
1 parent 4e7fc93 commit 988159a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bindings/python/src/encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 988159a

Please sign in to comment.