Fix python2

This commit is contained in:
konstin 2018-05-19 17:42:40 +02:00
parent 314a4a2b3e
commit c42b71bc55
1 changed files with 1 additions and 1 deletions

View File

@ -105,7 +105,7 @@ macro_rules! int_fits_larger_int(
}
}
pyobject_extract!(obj to $rust_type => {
let val = try!(obj.extract::<$larger_type>());
let val = try!($crate::ObjectProtocol::extract::<$larger_type>(obj));
match cast::<$larger_type, $rust_type>(val) {
Some(v) => Ok(v),
None => Err(exc::OverflowError.into())