diff options
author | Damien George <damien.p.george@gmail.com> | 2014-02-08 18:17:23 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-02-08 18:17:23 +0000 |
commit | 698ec21e46564ff0c2c71bf11d7eb4ef349c88d9 (patch) | |
tree | 3d0eac21ec784f970f9f5586dfbd28c66f0774e5 /py/objstr.c | |
parent | 23177088d255bec6c0bf93470aeac77194aa8258 (diff) |
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.
Diffstat (limited to 'py/objstr.c')
-rw-r--r-- | py/objstr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/py/objstr.c b/py/objstr.c index 03602b6ec..81e0d65b3 100644 --- a/py/objstr.c +++ b/py/objstr.c @@ -635,11 +635,11 @@ const char *mp_obj_str_get_str(mp_obj_t self_in) { } } -const byte *mp_obj_str_get_data(mp_obj_t self_in, uint *len) { +const char *mp_obj_str_get_data(mp_obj_t self_in, uint *len) { if (MP_OBJ_IS_STR(self_in)) { GET_STR_DATA_LEN(self_in, s, l); *len = l; - return s; + return (const char*)s; } else { bad_implicit_conversion(self_in); } |