Skip to content

Commit 75e995f

Browse files
committed
Rename mp_type_protocol -> mp_type_get_protocol_slot
1 parent 1b2da0c commit 75e995f

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

py/obj.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ mp_getbuffer_fun_t mp_type_get_getbuffer_slot(const mp_obj_type_t *type) {
738738
}
739739

740740

741-
const void *mp_type_protocol(const mp_obj_type_t *type) {
741+
const void *mp_type_get_protocol_slot(const mp_obj_type_t *type) {
742742
if (!(type->flags & MP_TYPE_FLAG_EXTENDED)) {
743743
return NULL;
744744
}

py/obj.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ extern mp_subscr_fun_t mp_type_get_subscr_slot(const mp_obj_type_t *);
669669
extern mp_getiter_fun_t mp_type_get_getiter_slot(const mp_obj_type_t *);
670670
extern mp_fun_1_t mp_type_get_iternext_slot(const mp_obj_type_t *);
671671
extern mp_getbuffer_fun_t mp_type_get_getbuffer_slot(const mp_obj_type_t *);
672-
extern const void *mp_type_protocol(const mp_obj_type_t *);
672+
extern const void *mp_type_get_protocol_slot(const mp_obj_type_t *);
673673

674674
// These fields ended up not being placed in the extended area, but accessors
675675
// were created for them anyway.

py/objtype.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1216,7 +1216,7 @@ mp_obj_t mp_obj_new_type(qstr name, mp_obj_t bases_tuple, mp_obj_t locals_dict)
12161216
// abstract base class which would translate C-level protocol to
12171217
// Python method calls, and any subclass inheriting from it will
12181218
// support this feature.
1219-
o->MP_TYPE_PROTOCOL = mp_type_protocol((mp_obj_type_t *)MP_OBJ_TO_PTR(bases_items[0]));
1219+
o->MP_TYPE_PROTOCOL = mp_type_get_protocol_slot((mp_obj_type_t *)MP_OBJ_TO_PTR(bases_items[0]));
12201220

12211221
if (bases_len >= 2) {
12221222
#if MICROPY_MULTIPLE_INHERITANCE

py/proto.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#ifndef MICROPY_UNSAFE_PROTO
3232
const void *mp_proto_get(uint16_t name, mp_const_obj_t obj) {
3333
const mp_obj_type_t *type = mp_obj_get_type(obj);
34-
const void *protocol = mp_type_protocol(type);
34+
const void *protocol = mp_type_get_protocol_slot(type);
3535
if (!protocol) {
3636
return NULL;
3737
}

py/proto.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#define MP_PROTOCOL_HEAD /* NOTHING */
3232
#define MP_PROTO_IMPLEMENT(name) /* NOTHING */
3333
static inline void *mp_proto_get(uint16_t name, mp_const_obj_type_t obj) {
34-
return mp_type_protocol(mp_obj_get_type(obj));
34+
return mp_type_get_protocol_slot(mp_obj_get_type(obj));
3535
}
3636
#else
3737
#define MP_PROTOCOL_HEAD \

0 commit comments

Comments
 (0)