mirror of
https://github.com/micropython/micropython.git
synced 2025-08-26 12:30:37 +02: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
19
py/objint.c
19
py/objint.c
@@ -457,12 +457,13 @@ STATIC const mp_rom_map_elem_t int_locals_dict_table[] = {
|
||||
|
||||
STATIC MP_DEFINE_CONST_DICT(int_locals_dict, int_locals_dict_table);
|
||||
|
||||
const mp_obj_type_t mp_type_int = {
|
||||
{ &mp_type_type },
|
||||
.name = MP_QSTR_int,
|
||||
.print = mp_obj_int_print,
|
||||
.make_new = mp_obj_int_make_new,
|
||||
.unary_op = mp_obj_int_unary_op,
|
||||
.binary_op = mp_obj_int_binary_op,
|
||||
.locals_dict = (mp_obj_dict_t *)&int_locals_dict,
|
||||
};
|
||||
MP_DEFINE_CONST_OBJ_TYPE(
|
||||
mp_type_int,
|
||||
MP_QSTR_int,
|
||||
MP_TYPE_FLAG_NONE,
|
||||
mp_obj_int_make_new,
|
||||
print, mp_obj_int_print,
|
||||
unary_op, mp_obj_int_unary_op,
|
||||
binary_op, mp_obj_int_binary_op,
|
||||
locals_dict, (mp_obj_dict_t *)&int_locals_dict
|
||||
);
|
||||
|
Reference in New Issue
Block a user