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:
Damien George
2014-02-08 18:17:23 +00:00
parent 23177088d2
commit 698ec21e46
12 changed files with 23 additions and 21 deletions

View File

@@ -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) {