mirror of
https://github.com/micropython/micropython.git
synced 2025-12-16 09:50:15 +01:00
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
@@ -43,12 +43,11 @@ STATIC void singleton_print(const mp_print_t *print, mp_obj_t self_in, mp_print_
|
||||
mp_printf(print, "%q", self->name);
|
||||
}
|
||||
|
||||
const mp_obj_type_t mp_type_singleton = {
|
||||
{ &mp_type_type },
|
||||
.name = MP_QSTR_,
|
||||
.print = singleton_print,
|
||||
.unary_op = mp_generic_unary_op,
|
||||
};
|
||||
MP_DEFINE_CONST_OBJ_TYPE(
|
||||
mp_type_singleton, MP_QSTR_, MP_TYPE_FLAG_NONE, MP_TYPE_NULL_MAKE_NEW,
|
||||
print, singleton_print,
|
||||
unary_op, mp_generic_unary_op
|
||||
);
|
||||
|
||||
const mp_obj_singleton_t mp_const_ellipsis_obj = {{&mp_type_singleton}, MP_QSTR_Ellipsis};
|
||||
#if MICROPY_PY_BUILTINS_NOTIMPLEMENTED
|
||||
|
||||
Reference in New Issue
Block a user