Commit 323f2953 authored by Damien George's avatar Damien George
Browse files

py: Workaround for broken leon compiler.

parent 95219e1b
......@@ -203,7 +203,9 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(gen_instance_throw_obj, 2, 4, gen_ins
STATIC mp_obj_t gen_instance_close(mp_obj_t self_in) {
mp_obj_t ret;
switch (mp_obj_gen_resume(self_in, mp_const_none, MP_OBJ_FROM_PTR(&mp_const_GeneratorExit_obj), &ret)) {
mp_obj_t send_value = mp_const_none;
mp_obj_t throw_value = MP_OBJ_FROM_PTR(&mp_const_GeneratorExit_obj);
switch (mp_obj_gen_resume(self_in, send_value, throw_value, &ret)) {
case MP_VM_RETURN_YIELD:
mp_raise_msg(&mp_type_RuntimeError, "generator ignored GeneratorExit");
......
......@@ -378,7 +378,8 @@ STATIC mp_obj_t list_insert(mp_obj_t self_in, mp_obj_t idx, mp_obj_t obj) {
index = self->len;
}
mp_obj_list_append(self_in, mp_const_none);
mp_obj_t item = mp_const_none;
mp_obj_list_append(self_in, item);
for (mp_int_t i = self->len-1; i > index; i--) {
self->items[i] = self->items[i-1];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment