diff options
| author | Dan Halbert <halbert@halwitz.org> | 2018-07-11 16:45:30 -0400 |
|---|---|---|
| committer | Dan Halbert <halbert@halwitz.org> | 2018-07-11 16:45:30 -0400 |
| commit | 7c219600a246d8956d0b23ea3f5d125a820e6b6a (patch) | |
| tree | 4cf793a66284322d48a8f430815c31cd1c9ffa1d /extmod/moduzlib.c | |
| parent | 4962468ffffac9ec4e36b2b1fc3f132516df3127 (diff) | |
| parent | 25ae98f07cb3c4488cb955403dfe56b8bb8db6f0 (diff) | |
WIP: after merge; before testing
Diffstat (limited to 'extmod/moduzlib.c')
| -rw-r--r-- | extmod/moduzlib.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/extmod/moduzlib.c b/extmod/moduzlib.c index 3d2ab88af..0d2366bea 100644 --- a/extmod/moduzlib.c +++ b/extmod/moduzlib.c @@ -53,7 +53,7 @@ STATIC unsigned char read_src_stream(TINF_DATA *data) { p -= offsetof(mp_obj_decompio_t, decomp); mp_obj_decompio_t *self = (mp_obj_decompio_t*)p; - const mp_stream_p_t *stream = mp_get_stream_raise(self->src_stream, MP_STREAM_OP_READ); + const mp_stream_p_t *stream = mp_get_stream(self->src_stream); int err; byte c; mp_uint_t out_sz = stream->read(self->src_stream, &c, 1, &err); @@ -68,6 +68,7 @@ STATIC unsigned char read_src_stream(TINF_DATA *data) { STATIC mp_obj_t decompio_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { mp_arg_check_num(n_args, n_kw, 1, 2, false); + mp_get_stream_raise(args[0], MP_STREAM_OP_READ); mp_obj_decompio_t *o = m_new_obj(mp_obj_decompio_t); o->base.type = type; memset(&o->decomp, 0, sizeof(o->decomp)); |
