aboutsummaryrefslogtreecommitdiff
path: root/py/objstringio.c
diff options
context:
space:
mode:
authorPaul m. p. P <pmpp.pub@gmail.com>2019-07-16 06:00:36 +0200
committerDamien George <damien.p.george@gmail.com>2019-07-17 16:12:19 +1000
commit3b3a4749ce46febe4d19a2392e94485c0659eb98 (patch)
tree8afa62d2a9f719f6cc486b4cb71052eb4b674247 /py/objstringio.c
parentbc66fe9064c48268dbc88b8c3197f560351b1039 (diff)
py/objstringio: Guard bytesio_stream_p struct w/ MICROPY_PY_IO_BYTESIO.
It's static and can lead to a compilation warning/error when MICROPY_PY_IO_BYTESIO is disabled.
Diffstat (limited to 'py/objstringio.c')
-rw-r--r--py/objstringio.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/py/objstringio.c b/py/objstringio.c
index 89b679031..8f1f76113 100644
--- a/py/objstringio.c
+++ b/py/objstringio.c
@@ -244,12 +244,6 @@ STATIC const mp_stream_p_t stringio_stream_p = {
.is_text = true,
};
-STATIC const mp_stream_p_t bytesio_stream_p = {
- .read = stringio_read,
- .write = stringio_write,
- .ioctl = stringio_ioctl,
-};
-
const mp_obj_type_t mp_type_stringio = {
{ &mp_type_type },
.name = MP_QSTR_StringIO,
@@ -262,6 +256,12 @@ const mp_obj_type_t mp_type_stringio = {
};
#if MICROPY_PY_IO_BYTESIO
+STATIC const mp_stream_p_t bytesio_stream_p = {
+ .read = stringio_read,
+ .write = stringio_write,
+ .ioctl = stringio_ioctl,
+};
+
const mp_obj_type_t mp_type_bytesio = {
{ &mp_type_type },
.name = MP_QSTR_BytesIO,