Skip to content

Commit c7ae8c5

Browse files
committed
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy