8000 py/objstr: Size-optimise failure path for mp_obj_str_get_buffer. · micropython/micropython@c7ae8c5 · GitHub
[go: up one dir, main page]

Skip to content

Commit c7ae8c5

Browse files
committed
DCFD
py/objstr: Size-optimise failure path for mp_obj_str_get_buffer.
These fields are never looked at if the function returns non-zero.
1 parent 3e1af5b commit c7ae8c5

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

py/objstr.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1913,9 +1913,6 @@ mp_int_t mp_obj_str_get_buffer(mp_obj_t self_in, mp_buffer_info_t *bufinfo, mp_u
19131913
return 0;
19141914
} else {
19151915
// can't write to a string
1916-
bufinfo->buf = NULL;
1917-
bufinfo->len = 0;
1918-
bufinfo->typecode = -1;
19191916
return 1;
19201917
}
19211918
}

0 commit comments

Comments
 (0)
0