From deb716df7556df1d663d600a5d4be8a098541c8d Mon Sep 17 00:00:00 2001 From: ChJR Date: Fri, 16 Aug 2019 17:51:54 +0900 Subject: [PATCH] Change inner int methods without direct access to payload. --- vm/src/obj/objint.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vm/src/obj/objint.rs b/vm/src/obj/objint.rs index b635252bc..cfe86f7bc 100644 --- a/vm/src/obj/objint.rs +++ b/vm/src/obj/objint.rs @@ -768,11 +768,11 @@ pub fn to_int(vm: &VirtualMachine, obj: &PyObjectRef, mut base: u32) -> PyResult // Retrieve inner int value: pub fn get_value(obj: &PyObjectRef) -> &BigInt { - &obj.payload::().unwrap().value + &get_py_int(obj).value } pub fn get_float_value(obj: &PyObjectRef, vm: &VirtualMachine) -> PyResult { - obj.payload::().unwrap().float(vm) + get_py_int(obj).float(vm) } #[inline]