py: Allow to pass buffer protocol flags to get_buffer helper funcs.

This commit is contained in:
Damien George
2014-04-18 22:59:24 +01:00
parent a8f5d15fc6
commit b11b85adaa
6 changed files with 12 additions and 12 deletions

View File

@@ -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 {