mirror of
https://github.com/micropython/micropython.git
synced 2026-01-08 05:00:26 +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:
@@ -43,7 +43,7 @@ static mp_obj_t stream_write(mp_obj_t self_in, mp_obj_t arg) {
|
||||
}
|
||||
|
||||
uint sz;
|
||||
const byte *buf = mp_obj_str_get_data(arg, &sz);
|
||||
const char *buf = mp_obj_str_get_data(arg, &sz);
|
||||
int error;
|
||||
machine_int_t out_sz = o->type->stream_p.write(self_in, buf, sz, &error);
|
||||
if (out_sz == -1) {
|
||||
|
||||
Reference in New Issue
Block a user