summaryrefslogtreecommitdiffstatshomepage
path: root/py/objint.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/objint.c')
-rw-r--r--py/objint.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/py/objint.c b/py/objint.c
index 59181eaf6d..905944d372 100644
--- a/py/objint.c
+++ b/py/objint.c
@@ -77,4 +77,13 @@ mp_obj_t mp_obj_new_int(machine_int_t value) {
nlr_jump(mp_obj_new_exception_msg(MP_QSTR_OverflowError, "small int overflow"));
return mp_const_none;
}
+
+machine_int_t mp_obj_int_get(mp_obj_t self_in) {
+ return MP_OBJ_SMALL_INT_VALUE(self_in);
+}
+
+machine_int_t mp_obj_int_get_checked(mp_obj_t self_in) {
+ return MP_OBJ_SMALL_INT_VALUE(self_in);
+}
+
#endif