Skip to content

Commit ec53a67

Browse files
committed
Rename mp_type_call -> mp_type_get_call_slot
1 parent 9c14340 commit ec53a67

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

py/obj.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ bool PLACE_IN_ITCM(mp_obj_is_true)(mp_obj_t arg) {
221221
}
222222

223223
bool mp_obj_is_callable(mp_obj_t o_in) {
224-
const mp_call_fun_t call = mp_type_call(mp_obj_get_type(o_in));
224+
const mp_call_fun_t call = mp_type_get_call_slot(mp_obj_get_type(o_in));
225225
if (call != mp_obj_instance_call) {
226226
return call != NULL;
227227
}
@@ -678,7 +678,7 @@ mp_obj_t mp_generic_unary_op(mp_unary_op_t op, mp_obj_t o_in) {
678678
}
679679
}
680680

681-
mp_call_fun_t mp_type_call(const mp_obj_type_t *type) {
681+
mp_call_fun_t mp_type_get_call_slot(const mp_obj_type_t *type) {
682682
if (!(type->flags & MP_TYPE_FLAG_EXTENDED)) {
683683
return NULL;
684684
}

py/obj.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ struct _mp_obj_full_type_t {
652652

653653

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

py/runtime.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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
649649
const mp_obj_type_t *type = mp_obj_get_type(fun_in);
650650

651651
// do the call
652-
mp_call_fun_t call = mp_type_call(type);
652+
mp_call_fun_t call = mp_type_get_call_slot(type);
653653
if (call) {
654654
return call(fun_in, n_args, n_kw, args);
655655
}

0 commit comments

Comments
 (0)