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

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