diff options
author | Jim Mussared <jim.mussared@gmail.com> | 2021-07-14 14:38:38 +1000 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2022-09-19 19:06:01 +1000 |
commit | 662b9761b37b054f08fe2f7c00d0fce3a418d0b0 (patch) | |
tree | 3ab168faeb26685d511bf47caa21d2eabdd86c69 /extmod/machine_pwm.c | |
parent | cdb880789f61ee037cc7905ad75a7a9201d12ba5 (diff) | |
download | micropython-662b9761b37b054f08fe2f7c00d0fce3a418d0b0.tar.gz micropython-662b9761b37b054f08fe2f7c00d0fce3a418d0b0.zip |
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>
Diffstat (limited to 'extmod/machine_pwm.c')
-rw-r--r-- | extmod/machine_pwm.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/extmod/machine_pwm.c b/extmod/machine_pwm.c index ddf49c1358..f12f70a2d1 100644 --- a/extmod/machine_pwm.c +++ b/extmod/machine_pwm.c @@ -132,12 +132,13 @@ STATIC const mp_rom_map_elem_t machine_pwm_locals_dict_table[] = { }; STATIC MP_DEFINE_CONST_DICT(machine_pwm_locals_dict, machine_pwm_locals_dict_table); -const mp_obj_type_t machine_pwm_type = { - { &mp_type_type }, - .name = MP_QSTR_PWM, - .print = mp_machine_pwm_print, - .make_new = mp_machine_pwm_make_new, - .locals_dict = (mp_obj_dict_t *)&machine_pwm_locals_dict, -}; +MP_DEFINE_CONST_OBJ_TYPE( + machine_pwm_type, + MP_QSTR_PWM, + MP_TYPE_FLAG_NONE, + mp_machine_pwm_make_new, + print, mp_machine_pwm_print, + locals_dict, &machine_pwm_locals_dict + ); #endif // MICROPY_PY_MACHINE_PWM |