summaryrefslogtreecommitdiff
path: root/py/objstringio.c
diff options
context:
space:
mode:
authorScott Shawcroft <scott@adafruit.com>2019-12-09 14:50:16 -0800
committerGitHub <noreply@github.com>2019-12-09 14:50:16 -0800
commit19ac8aea8ca7656ecfdac597448feab493803669 (patch)
tree8f6aef1374c8c4f7366dcabe028b2325b7d50d85 /py/objstringio.c
parent2379cd9ef48ca0ff11bafaaf83d6234534665202 (diff)
parentd5eca87ca23e9288b31c51f3d841fd2bb37c631b (diff)
Merge pull request #2353 from jepler/audiosample-protocol
Convert audiosamples to use micropython "protocols" (safely)
Diffstat (limited to 'py/objstringio.c')
-rw-r--r--py/objstringio.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/py/objstringio.c b/py/objstringio.c
index d2ca6decd..178e6446c 100644
--- a/py/objstringio.c
+++ b/py/objstringio.c
@@ -240,6 +240,7 @@ STATIC const mp_rom_map_elem_t stringio_locals_dict_table[] = {
STATIC MP_DEFINE_CONST_DICT(stringio_locals_dict, stringio_locals_dict_table);
STATIC const mp_stream_p_t stringio_stream_p = {
+ MP_PROTO_IMPLEMENT(MP_QSTR_protocol_stream)
.read = stringio_read,
.write = stringio_write,
.ioctl = stringio_ioctl,
@@ -247,6 +248,7 @@ STATIC const mp_stream_p_t stringio_stream_p = {
};
STATIC const mp_stream_p_t bytesio_stream_p = {
+ MP_PROTO_IMPLEMENT(MP_QSTR_protocol_stream)
.read = stringio_read,
.write = stringio_write,
.ioctl = stringio_ioctl,