bytes: Support buffer protocol.

This commit is contained in:
Paul Sokolovsky 2014-04-08 17:30:47 +03:00
parent b9cf3d3730
commit 7a70a3ae9a
1 changed files with 1 additions and 0 deletions

View File

@ -1352,6 +1352,7 @@ const mp_obj_type_t mp_type_bytes = {
.make_new = bytes_make_new,
.binary_op = str_binary_op,
.getiter = mp_obj_new_bytes_iterator,
.buffer_p = { .get_buffer = str_get_buffer },
.locals_dict = (mp_obj_t)&str_locals_dict,
};