mirror of
https://github.com/micropython/micropython.git
synced 2026-01-09 05:30:27 +01:00
py: Allow to pass buffer protocol flags to get_buffer helper funcs.
This commit is contained in:
@@ -427,7 +427,7 @@ STATIC machine_uint_t convert_obj_for_inline_asm(mp_obj_t obj) {
|
||||
return (machine_uint_t)items;
|
||||
} else {
|
||||
mp_buffer_info_t bufinfo;
|
||||
if (mp_get_buffer(obj, &bufinfo)) {
|
||||
if (mp_get_buffer(obj, &bufinfo, MP_BUFFER_WRITE)) {
|
||||
// supports the buffer protocol, return a pointer to the data
|
||||
return (machine_uint_t)bufinfo.buf;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user