array extend/append need extern linkage & right names

This commit is contained in:
Jeff Epler 2023-09-20 11:46:51 -05:00
parent 7a386545ca
commit a00f2d8940
No known key found for this signature in database
GPG Key ID: D5BF15AB975AB4DE
1 changed files with 6 additions and 6 deletions

View File

@ -467,7 +467,7 @@ STATIC mp_obj_t array_append(mp_obj_t self_in, mp_obj_t arg) {
self->free--;
return mp_const_none; // return None, as per CPython
}
MP_DEFINE_CONST_FUN_OBJ_2(array_append_obj, array_append);
MP_DEFINE_CONST_FUN_OBJ_2(mp_obj_array_append_obj, array_append);
STATIC mp_obj_t array_extend(mp_obj_t self_in, mp_obj_t arg_in) {
// self is not a memoryview, so we don't need to use (& TYPECODE_MASK)
@ -506,7 +506,7 @@ STATIC mp_obj_t array_extend(mp_obj_t self_in, mp_obj_t arg_in) {
}
return mp_const_none;
}
STATIC MP_DEFINE_CONST_FUN_OBJ_2(array_extend_obj, array_extend);
MP_DEFINE_CONST_FUN_OBJ_2(mp_obj_array_extend_obj, array_extend);
#endif
#if MICROPY_PY_BUILTINS_BYTEARRAY && MICROPY_CPYTHON_COMPAT
@ -742,8 +742,8 @@ MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(array_decode_obj, 1, 3, array_decode);
#if MICROPY_PY_ARRAY
STATIC const mp_rom_map_elem_t array_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_append), MP_ROM_PTR(&array_append_obj) },
{ MP_ROM_QSTR(MP_QSTR_extend), MP_ROM_PTR(&array_extend_obj) },
{ MP_ROM_QSTR(MP_QSTR_append), MP_ROM_PTR(&mp_obj_array_append_obj) },
{ MP_ROM_QSTR(MP_QSTR_extend), MP_ROM_PTR(&mp_obj_array_extend_obj) },
#if MICROPY_CPYTHON_COMPAT
{ MP_ROM_QSTR(MP_QSTR_decode), MP_ROM_PTR(&bytes_decode_obj) },
#endif
@ -754,8 +754,8 @@ STATIC MP_DEFINE_CONST_DICT(array_locals_dict, array_locals_dict_table);
#if MICROPY_PY_BUILTINS_BYTEARRAY
STATIC const mp_rom_map_elem_t bytearray_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_append), MP_ROM_PTR(&array_append_obj) },
{ MP_ROM_QSTR(MP_QSTR_extend), MP_ROM_PTR(&array_extend_obj) },
{ MP_ROM_QSTR(MP_QSTR_append), MP_ROM_PTR(&mp_obj_array_append_obj) },
{ MP_ROM_QSTR(MP_QSTR_extend), MP_ROM_PTR(&mp_obj_array_extend_obj) },
#if MICROPY_CPYTHON_COMPAT
{ MP_ROM_QSTR(MP_QSTR_find), MP_ROM_PTR(&buffer_find_obj) },