Rename mp_type_call -> mp_type_get_call_slot

This commit is contained in:
Jeff Epler 2021-07-12 07:03:25 -05:00
parent 9c1434014c
commit ec53a674cf
3 changed files with 5 additions and 5 deletions

View File

@ -221,7 +221,7 @@ bool PLACE_IN_ITCM(mp_obj_is_true)(mp_obj_t arg) {
}
bool mp_obj_is_callable(mp_obj_t o_in) {
const mp_call_fun_t call = mp_type_call(mp_obj_get_type(o_in));
const mp_call_fun_t call = mp_type_get_call_slot(mp_obj_get_type(o_in));
if (call != mp_obj_instance_call) {
return call != NULL;
}
@ -678,7 +678,7 @@ mp_obj_t mp_generic_unary_op(mp_unary_op_t op, mp_obj_t o_in) {
}
}
mp_call_fun_t mp_type_call(const mp_obj_type_t *type) {
mp_call_fun_t mp_type_get_call_slot(const mp_obj_type_t *type) {
if (!(type->flags & MP_TYPE_FLAG_EXTENDED)) {
return NULL;
}

View File

@ -652,7 +652,7 @@ struct _mp_obj_full_type_t {
// If the type object in question is known to have the extended fields, you can
// refer to type->MP_TYPE_CALL. Otherwise, you have to use mp_type_call(type)
// refer to type->MP_TYPE_CALL. Otherwise, you have to use mp_type_get_call_slot(type)
// The same goes for other fields within the extended region.
#define MP_TYPE_CALL ext[0].call
#define MP_TYPE_UNARY_OP ext[0].unary_op
@ -662,7 +662,7 @@ struct _mp_obj_full_type_t {
#define MP_TYPE_ITERNEXT ext[0].iternext
#define MP_TYPE_GET_BUFFER ext[0].buffer_p.get_buffer
#define MP_TYPE_PROTOCOL ext[0].protocol
extern mp_call_fun_t mp_type_call(const mp_obj_type_t *);
extern mp_call_fun_t mp_type_get_call_slot(const mp_obj_type_t *);
extern mp_unary_op_fun_t mp_type_unary_op(const mp_obj_type_t *);
extern mp_binary_op_fun_t mp_type_binary_op(const mp_obj_type_t *);
extern mp_subscr_fun_t mp_type_subscr(const mp_obj_type_t *);

View File

@ -649,7 +649,7 @@ mp_obj_t mp_call_function_n_kw(mp_obj_t fun_in, size_t n_args, size_t n_kw, cons
const mp_obj_type_t *type = mp_obj_get_type(fun_in);
// do the call
mp_call_fun_t call = mp_type_call(type);
mp_call_fun_t call = mp_type_get_call_slot(type);
if (call) {
return call(fun_in, n_args, n_kw, args);
}