diff options
Diffstat (limited to 'py/objset.c')
-rw-r--r-- | py/objset.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/py/objset.c b/py/objset.c index dd9a4d1e1d..6a02ba1202 100644 --- a/py/objset.c +++ b/py/objset.c @@ -17,14 +17,14 @@ typedef struct _mp_obj_set_t { void set_print(void (*print)(void *env, const char *fmt, ...), void *env, mp_obj_t self_in) { mp_obj_set_t *self = self_in; - bool first = true; + MP_BOOL first = MP_TRUE; print(env, "{"); for (int i = 0; i < self->set.alloc; i++) { if (self->set.table[i] != MP_OBJ_NULL) { if (!first) { print(env, ", "); } - first = false; + first = MP_FALSE; mp_obj_print_helper(print, env, self->set.table[i]); } } @@ -64,7 +64,7 @@ const mp_obj_type_t set_type = { NULL, // binary_op NULL, // getiter NULL, // iternext - .methods = { { NULL, NULL }, }, + .methods = NULL, }; mp_obj_t mp_obj_new_set(int n_args, mp_obj_t *items) { @@ -72,7 +72,7 @@ mp_obj_t mp_obj_new_set(int n_args, mp_obj_t *items) { o->base.type = &set_type; mp_set_init(&o->set, n_args); for (int i = 0; i < n_args; i++) { - mp_set_lookup(&o->set, items[i], true); + mp_set_lookup(&o->set, items[i], MP_TRUE); } return o; } @@ -80,5 +80,5 @@ mp_obj_t mp_obj_new_set(int n_args, mp_obj_t *items) { void mp_obj_set_store(mp_obj_t self_in, mp_obj_t item) { assert(MP_OBJ_IS_TYPE(self_in, &set_type)); mp_obj_set_t *self = self_in; - mp_set_lookup(&self->set, item, true); + mp_set_lookup(&self->set, item, MP_TRUE); } |