mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 03:30:14 +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
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user