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 /py/objboundmeth.c | |
parent | cdb880789f61ee037cc7905ad75a7a9201d12ba5 (diff) |
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 'py/objboundmeth.c')
-rw-r--r-- | py/objboundmeth.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/py/objboundmeth.c b/py/objboundmeth.c index 9936c06e4..353364cdc 100644 --- a/py/objboundmeth.c +++ b/py/objboundmeth.c @@ -95,17 +95,19 @@ STATIC void bound_meth_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { } #endif -STATIC const mp_obj_type_t mp_type_bound_meth = { - { &mp_type_type }, - .name = MP_QSTR_bound_method, +STATIC MP_DEFINE_CONST_OBJ_TYPE( + mp_type_bound_meth, + MP_QSTR_bound_method, + MP_TYPE_FLAG_NONE, + MP_TYPE_NULL_MAKE_NEW, #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_DETAILED - .print = bound_meth_print, + print, bound_meth_print, #endif - .call = bound_meth_call, + call, bound_meth_call #if MICROPY_PY_FUNCTION_ATTRS - .attr = bound_meth_attr, + , attr, bound_meth_attr #endif -}; + ); mp_obj_t mp_obj_new_bound_meth(mp_obj_t meth, mp_obj_t self) { mp_obj_bound_meth_t *o = mp_obj_malloc(mp_obj_bound_meth_t, &mp_type_bound_meth); |