summaryrefslogtreecommitdiff
path: root/py/obj.c
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-05-17 11:08:33 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-05-17 11:20:10 +0300
commitab7bf28489fde83c73da2a3a20b9eadb08e8cc81 (patch)
tree34c088b488835f630165080b28acad2030158458 /py/obj.c
parentc18ef2a9dd921f2dc589623ed43dd72cab94d3a4 (diff)
py: More const usage.
Diffstat (limited to 'py/obj.c')
-rw-r--r--py/obj.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/py/obj.c b/py/obj.c
index 437346b62..3617ff676 100644
--- a/py/obj.c
+++ b/py/obj.c
@@ -222,7 +222,7 @@ bool mp_obj_equal(mp_obj_t o1, mp_obj_t o2) {
return false;
}
-machine_int_t mp_obj_get_int(mp_obj_t arg) {
+machine_int_t mp_obj_get_int(mp_const_obj_t arg) {
// This function essentially performs implicit type conversion to int
// Note that Python does NOT provide implicit type conversion from
// float to int in the core expression language, try some_list[1.0].
@@ -242,7 +242,7 @@ machine_int_t mp_obj_get_int(mp_obj_t arg) {
// returns false if arg is not of integral type
// returns true and sets *value if it is of integral type
// can throw OverflowError if arg is of integral type, but doesn't fit in a machine_int_t
-bool mp_obj_get_int_maybe(mp_obj_t arg, machine_int_t *value) {
+bool mp_obj_get_int_maybe(mp_const_obj_t arg, machine_int_t *value) {
if (arg == mp_const_false) {
*value = 0;
} else if (arg == mp_const_true) {