all: Make all mp_obj_type_t defs use MP_DEFINE_CONST_OBJ_TYPE.
In preparation for upcoming rework of mp_obj_type_t layout. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
committed by
Damien George
parent
cdb880789f
commit
662b9761b3
10
py/objcell.c
10
py/objcell.c
@@ -40,13 +40,13 @@ STATIC void cell_print(const mp_print_t *print, mp_obj_t o_in, mp_print_kind_t k
|
||||
}
|
||||
#endif
|
||||
|
||||
STATIC const mp_obj_type_t mp_type_cell = {
|
||||
{ &mp_type_type },
|
||||
.name = MP_QSTR_, // cell representation is just value in < >
|
||||
STATIC MP_DEFINE_CONST_OBJ_TYPE(
|
||||
// cell representation is just value in < >
|
||||
mp_type_cell, MP_QSTR_, MP_TYPE_FLAG_NONE, MP_TYPE_NULL_MAKE_NEW
|
||||
#if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_DETAILED
|
||||
.print = cell_print,
|
||||
, print, cell_print
|
||||
#endif
|
||||
};
|
||||
);
|
||||
|
||||
mp_obj_t mp_obj_new_cell(mp_obj_t obj) {
|
||||
mp_obj_cell_t *o = mp_obj_malloc(mp_obj_cell_t, &mp_type_cell);
|
||||
|
||||
Reference in New Issue
Block a user