summaryrefslogtreecommitdiff
path: root/py/obj.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-05-12 23:05:53 +0100
committerDamien George <damien.p.george@gmail.com>2015-05-12 23:05:53 +0100
commitc50772d19fe2804a6d0258f89dd9967d3b516fd3 (patch)
tree9db781cc50f27fd4d07f9ef1db9a862a29690d53 /py/obj.h
parentc2a4e4effc81d8ab21bb014e34355643e5ca0da2 (diff)
py: Add mp_obj_get_int_truncated and use it where appropriate.
mp_obj_get_int_truncated will raise a TypeError if the argument is not an integral type. Use mp_obj_int_get_truncated only when you know the argument is a small or big int.
Diffstat (limited to 'py/obj.h')
-rw-r--r--py/obj.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/py/obj.h b/py/obj.h
index b9e912a33..5c4ba372a 100644
--- a/py/obj.h
+++ b/py/obj.h
@@ -511,6 +511,7 @@ bool mp_obj_is_callable(mp_obj_t o_in);
bool mp_obj_equal(mp_obj_t o1, mp_obj_t o2);
mp_int_t mp_obj_get_int(mp_const_obj_t arg);
+mp_int_t mp_obj_get_int_truncated(mp_const_obj_t arg);
bool mp_obj_get_int_maybe(mp_const_obj_t arg, mp_int_t *value);
#if MICROPY_PY_BUILTINS_FLOAT
mp_float_t mp_obj_get_float(mp_obj_t self_in);