From 1b2da0cda312be06115d10742edf91b7fe6d8c32 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 12 Jul 2021 07:04:02 -0500 Subject: [PATCH] Rename mp_type_getbuffer -> mp_type_get_getbuffer_slot --- ports/unix/modffi.c | 2 +- py/obj.c | 4 ++-- py/obj.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/unix/modffi.c b/ports/unix/modffi.c index c020759889..81dcb57d5d 100644 --- a/ports/unix/modffi.c +++ b/ports/unix/modffi.c @@ -456,7 +456,7 @@ STATIC mp_obj_t ffifunc_call(mp_obj_t self_in, size_t n_args, size_t n_kw, const const char *s = mp_obj_str_get_str(a); values[i].ffi = (ffi_arg)(intptr_t)s; } else { - mp_getbuffer_fun_t get_buffer = mp_type_getbuffer(((mp_obj_base_t *)MP_OBJ_TO_PTR(a))->type); + mp_getbuffer_fun_t get_buffer = mp_type_get_getbuffer_slot(((mp_obj_base_t *)MP_OBJ_TO_PTR(a))->type); if (get_buffer != NULL) { mp_obj_base_t *o = (mp_obj_base_t *)MP_OBJ_TO_PTR(a); mp_buffer_info_t bufinfo; diff --git a/py/obj.c b/py/obj.c index d8114aeae9..c07f1e518e 100644 --- a/py/obj.c +++ b/py/obj.c @@ -652,7 +652,7 @@ mp_obj_t mp_obj_new_generic_iterator(mp_obj_t obj, mp_obj_iter_buf_t *iter_buf) bool mp_get_buffer(mp_obj_t obj, mp_buffer_info_t *bufinfo, mp_uint_t flags) { const mp_obj_type_t *type = mp_obj_get_type(obj); - const mp_getbuffer_fun_t get_buffer = mp_type_getbuffer(type); + const mp_getbuffer_fun_t get_buffer = mp_type_get_getbuffer_slot(type); if (get_buffer == NULL) { return false; } @@ -730,7 +730,7 @@ mp_fun_1_t mp_type_get_iternext_slot(const mp_obj_type_t *type) { } -mp_getbuffer_fun_t mp_type_getbuffer(const mp_obj_type_t *type) { +mp_getbuffer_fun_t mp_type_get_getbuffer_slot(const mp_obj_type_t *type) { if (!(type->flags & MP_TYPE_FLAG_EXTENDED)) { return NULL; } diff --git a/py/obj.h b/py/obj.h index e7db8b512c..6ea455eb79 100644 --- a/py/obj.h +++ b/py/obj.h @@ -668,7 +668,7 @@ extern mp_binary_op_fun_t mp_type_get_binary_op_slot(const mp_obj_type_t *); extern mp_subscr_fun_t mp_type_get_subscr_slot(const mp_obj_type_t *); extern mp_getiter_fun_t mp_type_get_getiter_slot(const mp_obj_type_t *); extern mp_fun_1_t mp_type_get_iternext_slot(const mp_obj_type_t *); -extern mp_getbuffer_fun_t mp_type_getbuffer(const mp_obj_type_t *); +extern mp_getbuffer_fun_t mp_type_get_getbuffer_slot(const mp_obj_type_t *); extern const void *mp_type_protocol(const mp_obj_type_t *); // These fields ended up not being placed in the extended area, but accessors