py/objstr: Size-optimise failure path for mp_obj_str_get_buffer.

These fields are never looked at if the function returns non-zero.
pull/1/head
Jim Mussared 2019-10-22 12:36:02 +11:00
parent 3e1af5b36f
commit c7ae8c5a99
1 changed files with 0 additions and 3 deletions

View File

@ -1913,9 +1913,6 @@ mp_int_t mp_obj_str_get_buffer(mp_obj_t self_in, mp_buffer_info_t *bufinfo, mp_u
return 0;
} else {
// can't write to a string
bufinfo->buf = NULL;
bufinfo->len = 0;
bufinfo->typecode = -1;
return 1;
}
}