Skip to content

Commit 93c6d16

Browse files
committed
Rename mp_type_attr -> mp_type_get_attr_slot
1 parent 88434c5 commit 93c6d16

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

py/obj.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ mp_binary_op_fun_t mp_type_get_binary_op_slot(const mp_obj_type_t *type) {
701701
}
702702

703703

704-
mp_attr_fun_t mp_type_attr(const mp_obj_type_t *type) {
704+
mp_attr_fun_t mp_type_get_attr_slot(const mp_obj_type_t *type) {
705705
return type->attr;
706706
}
707707

py/obj.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ 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.
676-
extern mp_attr_fun_t mp_type_attr(const mp_obj_type_t *);
676+
extern mp_attr_fun_t mp_type_get_attr_slot(const mp_obj_type_t *);
677677
extern const void *mp_type_get_parent_slot(const mp_obj_type_t *);
678678

679679
// Return the size of a type object, which can be one of two lengths depending whether it has

py/runtime.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,7 +1118,7 @@ void mp_load_method_maybe(mp_obj_t obj, qstr attr, mp_obj_t *dest) {
11181118
dest[1] = obj;
11191119
return;
11201120
}
1121-
mp_attr_fun_t attr_fun = mp_type_attr(type);
1121+
mp_attr_fun_t attr_fun = mp_type_get_attr_slot(type);
11221122
if (attr_fun != NULL) {
11231123
// this type can do its own load, so call it
11241124
attr_fun(obj, attr, dest);
@@ -1179,7 +1179,7 @@ void mp_load_method_protected(mp_obj_t obj, qstr attr, mp_obj_t *dest, bool catc
11791179
void mp_store_attr(mp_obj_t base, qstr attr, mp_obj_t value) {
11801180
DEBUG_OP_printf("store attr %p.%s <- %p\n", base, qstr_str(attr), value);
11811181
const mp_obj_type_t *type = mp_obj_get_type(base);
1182-
mp_attr_fun_t attr_fun = mp_type_attr(type);
1182+
mp_attr_fun_t attr_fun = mp_type_get_attr_slot(type);
11831183
if (attr_fun != NULL) {
11841184
mp_obj_t dest[2] = {MP_OBJ_SENTINEL, value};
11851185
attr_fun(base, attr, dest);

0 commit comments

Comments
 (0)