Fix python2
This commit is contained in:
parent
314a4a2b3e
commit
c42b71bc55
|
@ -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())
|
||||
|
|
Loading…
Reference in New Issue