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

@@ -476,7 +476,7 @@ STATIC mp_obj_t set_unary_op(int op, mp_obj_t self_in) {
mp_obj_set_t *self = self_in;
switch (op) {
case MP_UNARY_OP_BOOL: return MP_BOOL(self->set.used != 0);
case MP_UNARY_OP_LEN: return MP_OBJ_NEW_SMALL_INT((mp_int_t)self->set.used);
case MP_UNARY_OP_LEN: return MP_OBJ_NEW_SMALL_INT(self->set.used);
default: return MP_OBJ_NULL; // op not supported
}
}