summaryrefslogtreecommitdiffstatshomepage
path: root/py/runtime.c
diff options
context:
space:
mode:
authorDamien <damien.p.george@gmail.com>2013-11-05 22:06:08 +0000
committerDamien <damien.p.george@gmail.com>2013-11-05 22:06:08 +0000
commit03c9cfb01554d8b5f9468cda3748d49eb6fd94b4 (patch)
tree8d5000b0974ae6ea7f7e3e9aac3bb1efb40de6bf /py/runtime.c
parent1c62d04e2eda24cb07565eb4380ece44e17ee839 (diff)
downloadmicropython-03c9cfb01554d8b5f9468cda3748d49eb6fd94b4.tar.gz
micropython-03c9cfb01554d8b5f9468cda3748d49eb6fd94b4.zip
Make byte code jumps relative.
Diffstat (limited to 'py/runtime.c')
-rw-r--r--py/runtime.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/py/runtime.c b/py/runtime.c
index 5c044d2216..6e60b36dbb 100644
--- a/py/runtime.c
+++ b/py/runtime.c
@@ -2020,9 +2020,9 @@ py_obj_t rt_getiter(py_obj_t o_in) {
py_obj_t rt_iternext(py_obj_t o_in) {
if (IS_O(o_in, O_GEN_INSTANCE)) {
py_obj_base_t *self = o_in;
- py_obj_base_t *fun = self->u_gen_instance.state[0];
- assert(fun->kind == O_FUN_BC);
- bool yield = py_execute_byte_code_2(fun->u_fun_bc.code, &self->u_gen_instance.ip, &self->u_gen_instance.state[1], &self->u_gen_instance.sp);
+ //py_obj_base_t *fun = self->u_gen_instance.state[0];
+ //assert(fun->kind == O_FUN_BC);
+ bool yield = py_execute_byte_code_2(&self->u_gen_instance.ip, &self->u_gen_instance.state[1], &self->u_gen_instance.sp);
if (yield) {
return *self->u_gen_instance.sp;
} else {