From 988159a9988fd3d2d26f29b93fb99a6e92cf5e7f Mon Sep 17 00:00:00 2001 From: Anthony MOI Date: Wed, 8 Jan 2020 13:42:26 -0500 Subject: [PATCH] Hotfix Python bindings for 32-bit systems --- bindings/python/src/encoding.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bindings/python/src/encoding.rs b/bindings/python/src/encoding.rs index f1d57fa35..bcced93e4 100644 --- a/bindings/python/src/encoding.rs +++ b/bindings/python/src/encoding.rs @@ -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