File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -395,6 +395,8 @@ mp_obj_t mp_obj_new_int_from_ll(long long val); // this must return a multi-prec
395395mp_obj_t mp_obj_new_int_from_ull (unsigned long long val ); // this must return a multi-precision integer object (or raise an overflow exception)
396396mp_obj_t mp_obj_new_str (const char * data , mp_uint_t len , bool make_qstr_if_not_already );
397397mp_obj_t mp_obj_new_bytes (const byte * data , mp_uint_t len );
398+ mp_obj_t mp_obj_new_bytearray (mp_uint_t n , void * items );
399+ mp_obj_t mp_obj_new_bytearray_by_ref (mp_uint_t n , void * items );
398400#if MICROPY_PY_BUILTINS_FLOAT
399401mp_obj_t mp_obj_new_float (mp_float_t val );
400402mp_obj_t mp_obj_new_complex (mp_float_t real , mp_float_t imag );
@@ -549,9 +551,6 @@ void mp_obj_set_store(mp_obj_t self_in, mp_obj_t item);
549551// slice
550552void mp_obj_slice_get (mp_obj_t self_in , mp_obj_t * start , mp_obj_t * stop , mp_obj_t * step );
551553
552- // array
553- mp_obj_t mp_obj_new_bytearray_by_ref (mp_uint_t n , void * items );
554-
555554// functions
556555#define MP_OBJ_FUN_ARGS_MAX (0xffff) // to set maximum value in n_args_max below
557556typedef struct _mp_obj_fun_builtin_t { // use this to make const objects that go in ROM
Original file line number Diff line number Diff line change 2828
2929#include "mpconfig.h"
3030#include "misc.h"
31+ #include "unicode.h"
3132
3233// attribute flags
3334#define FL_PRINT (0x01)
@@ -96,7 +97,7 @@ const byte *utf8_next_char(const byte *s) {
9697#endif
9798}
9899
99- mp_uint_t utf8_ptr_to_index (const char * s , const char * ptr ) {
100+ mp_uint_t utf8_ptr_to_index (const byte * s , const byte * ptr ) {
100101 mp_uint_t i = 0 ;
101102 while (ptr > s ) {
102103 if (!UTF8_IS_CONT (* -- ptr )) {
You can’t perform that action at this time.
0 commit comments