diff options
author | Damien George <damien.p.george@gmail.com> | 2019-08-05 16:32:10 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2019-08-06 15:58:23 +1000 |
commit | cd35dd9d9a29836906acdce60c931f6352b536d0 (patch) | |
tree | 7fe4f06cceb784bafb26794c847babd34e90d162 /py/objfun.c | |
parent | 2d3d4f74830eddaba8e13ca9a860a5cb7fb2f163 (diff) |
py: Allow to pass in read-only buffers to viper and inline-asm funcs.
Fixes #4936.
Diffstat (limited to 'py/objfun.c')
-rw-r--r-- | py/objfun.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/objfun.c b/py/objfun.c index d96c79ede..e0c6fb927 100644 --- a/py/objfun.c +++ b/py/objfun.c @@ -472,7 +472,7 @@ STATIC mp_uint_t convert_obj_for_inline_asm(mp_obj_t obj) { return (mp_uint_t)items; } else { mp_buffer_info_t bufinfo; - if (mp_get_buffer(obj, &bufinfo, MP_BUFFER_WRITE)) { + if (mp_get_buffer(obj, &bufinfo, MP_BUFFER_READ)) { // supports the buffer protocol, return a pointer to the data return (mp_uint_t)bufinfo.buf; } else { |