diff options
author | Damien George <damien.p.george@gmail.com> | 2014-04-20 17:50:40 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-04-20 17:50:40 +0100 |
commit | 3558f62fb5c21a19a518c2ba75860f0b5963219e (patch) | |
tree | cf8626118be5d0169ec0f1cd0482563595704c4e /py/emitglue.h | |
parent | bc5f0c19775e23b4f0621d52de47fb9438a78ba2 (diff) |
py: Making closures now passes pointer to stack, not a tuple for vars.
Closed over variables are now passed on the stack, instead of creating a
tuple and passing that. This way memory for the closed over variables
can be allocated within the closure object itself. See issue #510 for
background.
Diffstat (limited to 'py/emitglue.h')
-rw-r--r-- | py/emitglue.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/emitglue.h b/py/emitglue.h index 2f9960bfa..9aea2e4d4 100644 --- a/py/emitglue.h +++ b/py/emitglue.h @@ -37,4 +37,4 @@ void mp_emit_glue_assign_native_code(mp_raw_code_t *rc, void *f, uint len, int n void mp_emit_glue_assign_inline_asm_code(mp_raw_code_t *rc, void *f, uint len, int n_args); mp_obj_t mp_make_function_from_raw_code(mp_raw_code_t *rc, mp_obj_t def_args, mp_obj_t def_kw_args); -mp_obj_t mp_make_closure_from_raw_code(mp_raw_code_t *rc, mp_obj_t closure_tuple, mp_obj_t def_args, mp_obj_t def_kw_args); +mp_obj_t mp_make_closure_from_raw_code(mp_raw_code_t *rc, uint n_closed_over, const mp_obj_t *args); |