extmod/moduzlib: Use mperrno.h for error constants.

This commit is contained in:
Paul Sokolovsky 2016-09-03 00:34:57 +03:00
parent fafd587514
commit f7c4611523
1 changed files with 2 additions and 1 deletions

View File

@ -30,6 +30,7 @@
#include "py/nlr.h"
#include "py/runtime.h"
#include "py/stream.h"
#include "py/mperrno.h"
#if MICROPY_PY_UZLIB
@ -93,7 +94,7 @@ STATIC mp_uint_t decompio_read(mp_obj_t o_in, void *buf, mp_uint_t size, int *er
o->eof = true;
}
if (st < 0) {
*errcode = EINVAL;
*errcode = MP_EINVAL;
return MP_STREAM_ERROR;
}
return o->decomp.dest - (byte*)buf;