py: mp_obj_get_type_qstr as macro saves 24 bytes
This commit is contained in:
parent
c0b32976e8
commit
65e26f4a06
4
py/obj.c
4
py/obj.c
|
@ -57,10 +57,6 @@ mp_obj_type_t *mp_obj_get_type(mp_const_obj_t o_in) {
|
|||
}
|
||||
}
|
||||
|
||||
qstr mp_obj_get_type_qstr(mp_const_obj_t o_in) {
|
||||
return mp_obj_get_type(o_in)->name;
|
||||
}
|
||||
|
||||
const char *mp_obj_get_type_str(mp_const_obj_t o_in) {
|
||||
return qstr_str(mp_obj_get_type_qstr(o_in));
|
||||
}
|
||||
|
|
2
py/obj.h
2
py/obj.h
|
@ -680,7 +680,7 @@ mp_obj_t mp_obj_new_memoryview(byte typecode, size_t nitems, void *items);
|
|||
|
||||
mp_obj_type_t *mp_obj_get_type(mp_const_obj_t o_in);
|
||||
const char *mp_obj_get_type_str(mp_const_obj_t o_in);
|
||||
qstr mp_obj_get_type_qstr(mp_const_obj_t o_in);
|
||||
#define mp_obj_get_type_qstr(o_in) (mp_obj_get_type((o_in))->name)
|
||||
bool mp_obj_is_subclass_fast(mp_const_obj_t object, mp_const_obj_t classinfo); // arguments should be type objects
|
||||
mp_obj_t mp_instance_cast_to_native_base(mp_obj_t self_in, mp_const_obj_t native_type);
|
||||
|
||||
|
|
Loading…
Reference in New Issue