mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 19:50:30 +01:00
unix: Use mp_obj_str_get_str instead of mp_obj_str_get_data.
This commit is contained in:
@@ -126,8 +126,7 @@ STATIC ffi_type *char2ffi_type(char c)
|
||||
STATIC ffi_type *get_ffi_type(mp_obj_t o_in)
|
||||
{
|
||||
if (MP_OBJ_IS_STR(o_in)) {
|
||||
mp_uint_t len;
|
||||
const char *s = mp_obj_str_get_data(o_in, &len);
|
||||
const char *s = mp_obj_str_get_str(o_in);
|
||||
ffi_type *t = char2ffi_type(*s);
|
||||
if (t != NULL) {
|
||||
return t;
|
||||
|
||||
Reference in New Issue
Block a user