diff options
author | Jim Mussared <jim.mussared@gmail.com> | 2019-10-22 12:36:02 +1100 |
---|---|---|
committer | Jim Mussared <jim.mussared@gmail.com> | 2019-10-22 13:54:09 +1100 |
commit | c7ae8c5a99fa463dea23c34e0bd70e71dfc118b9 (patch) | |
tree | 2eb3127a462a4e82f022708fa6105794e9c376ca /py/objstr.c | |
parent | 3e1af5b36fc181231b6c7b7603b21490fb9b22e6 (diff) |
py/objstr: Size-optimise failure path for mp_obj_str_get_buffer.
These fields are never looked at if the function returns non-zero.
Diffstat (limited to 'py/objstr.c')
-rw-r--r-- | py/objstr.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/py/objstr.c b/py/objstr.c index 882436363..e221982c5 100644 --- a/py/objstr.c +++ b/py/objstr.c @@ -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; } } |