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/objint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'py/objint.c') diff --git a/py/objint.c b/py/objint.c index 8bec4a3e3..110876e00 100644 --- a/py/objint.c +++ b/py/objint.c @@ -273,7 +273,7 @@ STATIC mp_obj_t int_from_bytes(uint n_args, const mp_obj_t *args) { // get the buffer info mp_buffer_info_t bufinfo; - mp_get_buffer_raise(args[1], &bufinfo); + mp_get_buffer_raise(args[1], &bufinfo, MP_BUFFER_READ); // convert the bytes to an integer machine_uint_t value = 0; -- cgit v1.2.3