py: Make MP_OBJ_NEW_SMALL_INT cast arg to mp_int_t itself.

Addresses issue #724.
This commit is contained in:
Damien George
2014-07-31 10:49:14 +01:00
parent fa1ecda3fd
commit bb4c6f35c6
17 changed files with 44 additions and 44 deletions

View File

@@ -74,7 +74,7 @@ STATIC mp_obj_t bool_unary_op(int op, mp_obj_t o_in) {
STATIC mp_obj_t bool_binary_op(int op, mp_obj_t lhs_in, mp_obj_t rhs_in) {
if (MP_BINARY_OP_OR <= op && op <= MP_BINARY_OP_NOT_EQUAL) {
return mp_binary_op(op, MP_OBJ_NEW_SMALL_INT((mp_int_t)mp_obj_is_true(lhs_in)), rhs_in);
return mp_binary_op(op, MP_OBJ_NEW_SMALL_INT(mp_obj_is_true(lhs_in)), rhs_in);
}
return MP_OBJ_NULL; // op not supported
}