aboutsummaryrefslogtreecommitdiff
path: root/extmod/moduzlib.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2020-02-11 13:17:41 +1100
committerDamien George <damien.p.george@gmail.com>2020-02-13 11:03:37 +1100
commit97eca38c4f03e76bd464fb25974544a043af2a9e (patch)
tree9141a63cb6e1e414330d0a93e11ceedc955f4c27 /extmod/moduzlib.c
parent7679e3be96f7e0996faa89678beaf423d7c25999 (diff)
py: Add mp_raise_type helper macro and use it where appropriate.
This provides a more consistent C-level API to raise exceptions, ie moving away from nlr_raise towards mp_raise_XXX. It also reduces code size by a small amount on some ports.
Diffstat (limited to 'extmod/moduzlib.c')
-rw-r--r--extmod/moduzlib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/extmod/moduzlib.c b/extmod/moduzlib.c
index 64327f1f7..9d3ca7da6 100644
--- a/extmod/moduzlib.c
+++ b/extmod/moduzlib.c
@@ -61,7 +61,7 @@ STATIC int read_src_stream(TINF_DATA *data) {
mp_raise_OSError(err);
}
if (out_sz == 0) {
- nlr_raise(mp_obj_new_exception(&mp_type_EOFError));
+ mp_raise_type(&mp_type_EOFError);
}
return c;
}