diff --git a/py/objdict.c b/py/objdict.c index f226abbd2f..66a442fbaa 100644 --- a/py/objdict.c +++ b/py/objdict.c @@ -61,8 +61,8 @@ static mp_obj_t dict_binary_op(int op, mp_obj_t lhs_in, mp_obj_t rhs_in) { } const mp_obj_type_t dict_type = { - .base = { &mp_const_type }, - .name = "dict", + { &mp_const_type }, + "dict", .print = dict_print, .make_new = dict_make_new, .binary_op = dict_binary_op, diff --git a/py/objfloat.c b/py/objfloat.c index 4b51971814..d21472d5d6 100644 --- a/py/objfloat.c +++ b/py/objfloat.c @@ -62,8 +62,8 @@ static mp_obj_t float_binary_op(int op, mp_obj_t lhs_in, mp_obj_t rhs_in) { } const mp_obj_type_t float_type = { - .base = { &mp_const_type }, - .name = "float", + { &mp_const_type }, + "float", .print = float_print, .make_new = float_make_new, .unary_op = float_unary_op, diff --git a/py/objint.c b/py/objint.c index cf51b7870a..9cd5ebae29 100644 --- a/py/objint.c +++ b/py/objint.c @@ -31,8 +31,8 @@ static mp_obj_t int_make_new(mp_obj_t type_in, int n_args, const mp_obj_t *args) } const mp_obj_type_t int_type = { - .base = { &mp_const_type }, - .name = "int", + { &mp_const_type }, + "int", .make_new = int_make_new, }; diff --git a/py/objlist.c b/py/objlist.c index 0446412e83..5162fa09ff 100644 --- a/py/objlist.c +++ b/py/objlist.c @@ -293,8 +293,8 @@ static const mp_method_t list_type_methods[] = { }; const mp_obj_type_t list_type = { - .base = { &mp_const_type }, - .name = "list", + { &mp_const_type }, + "list", .print = list_print, .make_new = list_make_new, .binary_op = list_binary_op, @@ -360,8 +360,8 @@ mp_obj_t list_it_iternext(mp_obj_t self_in) { } static const mp_obj_type_t list_it_type = { - .base = { &mp_const_type }, - .name = "list_iterator", + { &mp_const_type }, + "list_iterator", .iternext = list_it_iternext, }; diff --git a/py/objnone.c b/py/objnone.c index dc93c25e2d..c0efe6c0f5 100644 --- a/py/objnone.c +++ b/py/objnone.c @@ -15,8 +15,8 @@ void none_print(void (*print)(void *env, const char *fmt, ...), void *env, mp_ob } const mp_obj_type_t none_type = { - .base = { &mp_const_type }, - .name = "NoneType", + { &mp_const_type }, + "NoneType", .print = none_print, }; diff --git a/py/objslice.c b/py/objslice.c index 3b1bbb186b..d95ccef06f 100644 --- a/py/objslice.c +++ b/py/objslice.c @@ -48,8 +48,8 @@ void slice_print(void (*print)(void *env, const char *fmt, ...), void *env, mp_o } const mp_obj_type_t slice_type = { - .base = { &mp_const_type }, - .name = "slice", + { &mp_const_type }, + "slice", .print = slice_print, }; diff --git a/py/objstr.c b/py/objstr.c index b95aafe432..cc9f7f85b4 100644 --- a/py/objstr.c +++ b/py/objstr.c @@ -191,8 +191,8 @@ static const mp_method_t str_type_methods[] = { }; const mp_obj_type_t str_type = { - .base = { &mp_const_type }, - .name = "str", + { &mp_const_type }, + "str", .print = str_print, .binary_op = str_binary_op, .getiter = str_getiter, @@ -234,8 +234,8 @@ mp_obj_t str_it_iternext(mp_obj_t self_in) { } static const mp_obj_type_t str_it_type = { - .base = { &mp_const_type }, - .name = "str_iterator", + { &mp_const_type }, + "str_iterator", .iternext = str_it_iternext, }; diff --git a/py/objtuple.c b/py/objtuple.c index e96f76aeaf..0050fc5ea0 100644 --- a/py/objtuple.c +++ b/py/objtuple.c @@ -97,8 +97,8 @@ static mp_obj_t tuple_getiter(mp_obj_t o_in) { } const mp_obj_type_t tuple_type = { - .base = { &mp_const_type }, - .name = "tuple", + { &mp_const_type }, + "tuple", .print = tuple_print, .make_new = tuple_make_new, .binary_op = tuple_binary_op, @@ -162,8 +162,8 @@ static mp_obj_t tuple_it_iternext(mp_obj_t self_in) { } static const mp_obj_type_t tuple_it_type = { - .base = { &mp_const_type }, - .name = "tuple_iterator", + { &mp_const_type }, + "tuple_iterator", .iternext = tuple_it_iternext, }; diff --git a/py/objtype.c b/py/objtype.c index 012071d6e1..8778c180ca 100644 --- a/py/objtype.c +++ b/py/objtype.c @@ -23,8 +23,8 @@ static mp_obj_t type_call_n(mp_obj_t self_in, int n_args, const mp_obj_t *args) } const mp_obj_type_t mp_const_type = { - .base = { &mp_const_type }, - .name = "type", + { &mp_const_type }, + "type", .print = type_print, .call_n = type_call_n, };