aboutsummaryrefslogtreecommitdiff
path: root/py/modstruct.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-04-18 22:29:21 +0100
committerDamien George <damien.p.george@gmail.com>2014-04-18 22:29:21 +0100
commit57a4b4f178698435b584892f69db5d5f2ea396dc (patch)
treeb38aac7f18d31f714c2029a0a6e3f93e36447295 /py/modstruct.c
parent3fd2d7fad2022e3f26304fbc6ad74e6d8dd66e5f (diff)
py: Add typecode to buffer protocol.
When querying an object that supports the buffer protocol, that object must now return a typecode (as per binary.[ch]). This does not have to be honoured by the caller, but can be useful for determining element size.
Diffstat (limited to 'py/modstruct.c')
-rw-r--r--py/modstruct.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/modstruct.c b/py/modstruct.c
index 3b9679a4c..945f4fe46 100644
--- a/py/modstruct.c
+++ b/py/modstruct.c
@@ -55,7 +55,7 @@ STATIC mp_obj_t struct_unpack(mp_obj_t fmt_in, mp_obj_t data_in) {
char fmt_type = get_fmt_type(&fmt);
uint size = calcsize_items(fmt);
mp_obj_tuple_t *res = mp_obj_new_tuple(size, NULL);
- buffer_info_t bufinfo;
+ mp_buffer_info_t bufinfo;
mp_get_buffer_raise(data_in, &bufinfo);
byte *p = bufinfo.buf;