Skip to content
Snippets Groups Projects
Commit 3b3a4749 authored by Paul m. p. P's avatar Paul m. p. P Committed by Damien George
Browse files

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.
parent bc66fe90
Branches
No related tags found
No related merge requests found
...@@ -244,12 +244,6 @@ STATIC const mp_stream_p_t stringio_stream_p = { ...@@ -244,12 +244,6 @@ STATIC const mp_stream_p_t stringio_stream_p = {
.is_text = true, .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 = { const mp_obj_type_t mp_type_stringio = {
{ &mp_type_type }, { &mp_type_type },
.name = MP_QSTR_StringIO, .name = MP_QSTR_StringIO,
...@@ -262,6 +256,12 @@ const mp_obj_type_t mp_type_stringio = { ...@@ -262,6 +256,12 @@ const mp_obj_type_t mp_type_stringio = {
}; };
#if MICROPY_PY_IO_BYTESIO #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 = { const mp_obj_type_t mp_type_bytesio = {
{ &mp_type_type }, { &mp_type_type },
.name = MP_QSTR_BytesIO, .name = MP_QSTR_BytesIO,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment