mirror of
https://github.com/micropython/micropython.git
synced 2026-01-07 20:50:14 +01:00
Make mp_obj_str_get_data return char* instead of byte*.
Can't decide which is better for string type, char or byte pointer. Changing to char removes a few casts. Really need to do proper unicode.
This commit is contained in:
@@ -174,7 +174,7 @@ static mp_obj_t array_make_new(mp_obj_t type_in, uint n_args, uint n_kw, const m
|
||||
}
|
||||
// TODO check args
|
||||
uint l;
|
||||
const byte *typecode = mp_obj_str_get_data(args[0], &l);
|
||||
const char *typecode = mp_obj_str_get_data(args[0], &l);
|
||||
if (n_args == 1) {
|
||||
return array_new(*typecode, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user