From c412998c491dcad3d6fa9f7c9797fedaebd25798 Mon Sep 17 00:00:00 2001 From: Damien George Date: Wed, 19 Mar 2014 23:17:23 +0000 Subject: [PATCH] py: Add comment about bugs in objint_longlong.c. --- py/objint_longlong.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/py/objint_longlong.c b/py/objint_longlong.c index 58c2466fd0..52aaa9e7b5 100644 --- a/py/objint_longlong.c +++ b/py/objint_longlong.c @@ -45,6 +45,9 @@ mp_obj_t int_binary_op(int op, mp_obj_t lhs_in, mp_obj_t rhs_in) { mp_obj_int_t *rhs = rhs_in; long long rhs_val; + // TODO it can be that lhs is a small int (eg 1 + longlong) + // TODO inplace operations should not modify the int! + if (MP_OBJ_IS_SMALL_INT(rhs)) { rhs_val = MP_OBJ_SMALL_INT_VALUE(rhs); } else if (MP_OBJ_IS_TYPE(rhs, &int_type)) {