@@ -456,7 +456,7 @@ STATIC mp_obj_t str_join(mp_obj_t self_in, mp_obj_t arg) {
456456
457457#define is_ws (c ) ((c) == ' ' || (c) == '\t')
458458
459- STATIC mp_obj_t str_split (mp_uint_t n_args , const mp_obj_t * args ) {
459+ mp_obj_t mp_obj_str_split (mp_uint_t n_args , const mp_obj_t * args ) {
460460 const mp_obj_type_t * self_type = mp_obj_get_type (args [0 ]);
461461 mp_int_t splits = -1 ;
462462 mp_obj_t sep = mp_const_none ;
@@ -535,7 +535,7 @@ STATIC mp_obj_t str_rsplit(mp_uint_t n_args, const mp_obj_t *args) {
535535 if (n_args < 3 ) {
536536 // If we don't have split limit, it doesn't matter from which side
537537 // we split.
538- return str_split (n_args , args );
538+ return mp_obj_str_split (n_args , args );
539539 }
540540 const mp_obj_type_t * self_type = mp_obj_get_type (args [0 ]);
541541 mp_obj_t sep = args [1 ];
@@ -1762,7 +1762,7 @@ MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(str_rfind_obj, 2, 4, str_rfind);
17621762MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN (str_index_obj , 2 , 4 , str_index );
17631763MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN (str_rindex_obj , 2 , 4 , str_rindex );
17641764MP_DEFINE_CONST_FUN_OBJ_2 (str_join_obj , str_join );
1765- MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN (str_split_obj , 1 , 3 , str_split );
1765+ MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN (str_split_obj , 1 , 3 , mp_obj_str_split );
17661766MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN (str_rsplit_obj , 1 , 3 , str_rsplit );
17671767MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN (str_startswith_obj , 2 , 3 , str_startswith );
17681768MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN (str_endswith_obj , 2 , 3 , str_endswith );
0 commit comments