-
- Downloads
py: Convert mp_uint_t to size_t for tuple/list accessors.
This patch changes mp_uint_t to size_t for the len argument of the following public facing C functions: mp_obj_tuple_get mp_obj_list_get mp_obj_get_array These functions take a pointer to the len argument (to be filled in by the function) and callers of these functions should update their code so the type of len is changed to size_t. For ports that don't use nan-boxing there should be no change in generate code because the size of the type remains the same (word sized), and in a lot of cases there won't even be a compiler warning if the type remains as mp_uint_t. The reason for this change is to standardise on the use of size_t for variables that count memory (or memory related) sizes/lengths. It helps builds that use nan-boxing.
Showing
- py/builtinimport.c 1 addition, 1 deletionpy/builtinimport.c
- py/modthread.c 1 addition, 1 deletionpy/modthread.c
- py/obj.c 2 additions, 2 deletionspy/obj.c
- py/obj.h 3 additions, 3 deletionspy/obj.h
- py/objfun.c 1 addition, 1 deletionpy/objfun.c
- py/objlist.c 2 additions, 2 deletionspy/objlist.c
- py/objnamedtuple.c 1 addition, 1 deletionpy/objnamedtuple.c
- py/objstr.c 2 additions, 2 deletionspy/objstr.c
- py/objtuple.c 1 addition, 1 deletionpy/objtuple.c
- py/objtype.c 2 additions, 2 deletionspy/objtype.c
- py/runtime.c 3 additions, 3 deletionspy/runtime.c
Loading
Please register or sign in to comment