aboutsummaryrefslogtreecommitdiff
path: root/py/objfun.c
diff options
context:
space:
mode:
authorDamien George2014-04-18 22:59:24 +0100
committerDamien George2014-04-18 22:59:24 +0100
commitb11b85adaac9ac2e460647e59f951f5086cd2d4e (patch)
treec0c2e5b3159cc7e6455e9614ce93c5e432029428 /py/objfun.c
parenta8f5d15fc6f2ee988e028ce8a5fc9f50c17309f4 (diff)
py: Allow to pass buffer protocol flags to get_buffer helper funcs.
Diffstat (limited to 'py/objfun.c')
-rw-r--r--py/objfun.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/objfun.c b/py/objfun.c
index 633f5d0ca..ab6326057 100644
--- a/py/objfun.c
+++ b/py/objfun.c
@@ -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 {