diff --git a/py/stream.c b/py/stream.c index 36325e7d41..d099c82387 100644 --- a/py/stream.c +++ b/py/stream.c @@ -472,7 +472,7 @@ STATIC mp_obj_t stream_tell(mp_obj_t self) { } MP_DEFINE_CONST_FUN_OBJ_1(mp_stream_tell_obj, stream_tell); -STATIC mp_obj_t stream_flush(mp_obj_t self) { +mp_obj_t mp_stream_flush(mp_obj_t self) { const mp_stream_p_t *stream_p = mp_get_stream(self); int error; mp_uint_t res = stream_p->ioctl(self, MP_STREAM_FLUSH, 0, &error); diff --git a/py/stream.h b/py/stream.h index d71b669e90..e776d8d5d1 100644 --- a/py/stream.h +++ b/py/stream.h @@ -120,6 +120,7 @@ mp_uint_t mp_stream_rw(mp_obj_t stream, void *buf, mp_uint_t size, int *errcode, #define mp_stream_read_exactly(stream, buf, size, err) mp_stream_rw(stream, buf, size, err, MP_STREAM_RW_READ) void mp_stream_write_adaptor(void *self, const char *buf, size_t len); +mp_obj_t mp_stream_flush(mp_obj_t self); // CIRCUITPY #if MICROPY_STREAMS_POSIX_API #include