summaryrefslogtreecommitdiffstatshomepage
path: root/py/obj.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-01-02 20:57:05 +0000
committerDamien George <damien.p.george@gmail.com>2014-01-02 20:57:05 +0000
commit0ff883904a2f25b4c1b3206e4a88c2d300417046 (patch)
tree4223fe9ef2abbc9b365bea1bfa559d893e0da80c /py/obj.h
parentebd2e8702de7ab9ea5979cd20dc9330ecf7375f7 (diff)
downloadmicropython-0ff883904a2f25b4c1b3206e4a88c2d300417046.tar.gz
micropython-0ff883904a2f25b4c1b3206e4a88c2d300417046.zip
py: Fix generator where state array was incorrectly indexed.
Generator objects now allocate the object and the state in one malloc. This improvement fixes Issue #38.
Diffstat (limited to 'py/obj.h')
-rw-r--r--py/obj.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/obj.h b/py/obj.h
index 682faafd8e..839209a405 100644
--- a/py/obj.h
+++ b/py/obj.h
@@ -136,7 +136,7 @@ mp_obj_t mp_obj_new_range_iterator(int cur, int stop, int step);
mp_obj_t mp_obj_new_fun_bc(int n_args, uint n_state, const byte *code);
mp_obj_t mp_obj_new_fun_asm(uint n_args, void *fun);
mp_obj_t mp_obj_new_gen_wrap(uint n_locals, uint n_stack, mp_obj_t fun);
-mp_obj_t mp_obj_new_gen_instance(mp_obj_t state, const byte *ip, mp_obj_t *sp);
+mp_obj_t mp_obj_new_gen_instance(const byte *bytecode, uint n_state, int n_args, const mp_obj_t *args);
mp_obj_t mp_obj_new_closure(mp_obj_t fun, mp_obj_t closure_tuple);
mp_obj_t mp_obj_new_tuple(uint n, mp_obj_t *items);
mp_obj_t mp_obj_new_tuple_reverse(uint n, mp_obj_t *items);