summaryrefslogtreecommitdiff
path: root/py/stream.h
diff options
context:
space:
mode:
authoriabdalkader <i.abdalkader@gmail.com>2023-11-20 14:24:04 +0100
committerDamien George <damien@micropython.org>2024-03-15 18:11:28 +1100
commit85028aadab6763a0d899e71f54643840d9f8546d (patch)
tree6a6e1a60b307fd183a0b3200ca2ea13240d21d3e /py/stream.h
parent61ee59ad8917d64f4f4a0e7a261fd838c5724014 (diff)
py/stream: Add mp_stream_seek() helper function.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
Diffstat (limited to 'py/stream.h')
-rw-r--r--py/stream.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/py/stream.h b/py/stream.h
index e6e6f283d..7c2e87a87 100644
--- a/py/stream.h
+++ b/py/stream.h
@@ -115,6 +115,7 @@ mp_obj_t mp_stream_write(mp_obj_t self_in, const void *buf, size_t len, byte fla
mp_uint_t mp_stream_rw(mp_obj_t stream, void *buf, mp_uint_t size, int *errcode, byte flags);
#define mp_stream_write_exactly(stream, buf, size, err) mp_stream_rw(stream, (byte *)buf, size, err, MP_STREAM_RW_WRITE)
#define mp_stream_read_exactly(stream, buf, size, err) mp_stream_rw(stream, buf, size, err, MP_STREAM_RW_READ)
+mp_uint_t mp_stream_seek(mp_obj_t stream, mp_off_t offset, int whence, int *errcode);
void mp_stream_write_adaptor(void *self, const char *buf, size_t len);