diff options
author | Damien George <damien.p.george@gmail.com> | 2017-01-17 00:14:14 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2017-01-17 00:14:14 +1100 |
commit | 681994638bfda0fba5f36f8a4148628792f698f9 (patch) | |
tree | 8f66be145deaa7a5394667165d3dee62129a9d4e /py/objgenerator.c | |
parent | aeb2655073970f8b51572cf033274800a67b23ee (diff) | |
download | micropython-681994638bfda0fba5f36f8a4148628792f698f9.tar.gz micropython-681994638bfda0fba5f36f8a4148628792f698f9.zip |
py/objgenerator: When throwing an object, don't make an exc instance.
Arguments to throw() for generators don't need to be exceptions.
Diffstat (limited to 'py/objgenerator.c')
-rw-r--r-- | py/objgenerator.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/py/objgenerator.c b/py/objgenerator.c index cbef9fea3d..9468a21892 100644 --- a/py/objgenerator.c +++ b/py/objgenerator.c @@ -193,7 +193,6 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(gen_instance_send_obj, gen_instance_send); STATIC mp_obj_t gen_instance_close(mp_obj_t self_in); STATIC mp_obj_t gen_instance_throw(size_t n_args, const mp_obj_t *args) { mp_obj_t exc = (n_args == 2) ? args[1] : args[2]; - exc = mp_make_raise_obj(exc); mp_obj_t ret = gen_resume_and_raise(args[0], mp_const_none, exc); if (ret == MP_OBJ_STOP_ITERATION) { |