From b11b85adaac9ac2e460647e59f951f5086cd2d4e Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 18 Apr 2014 22:59:24 +0100 Subject: py: Allow to pass buffer protocol flags to get_buffer helper funcs. --- py/objfun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'py/objfun.c') 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 { -- cgit v1.2.3