summaryrefslogtreecommitdiff
path: root/py/obj.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2018-06-29 16:32:58 +1000
committerDamien George <damien.p.george@gmail.com>2018-07-02 15:30:57 +1000
commitb488a4a8480533a6a3c9468c2f8bd359c94d4d02 (patch)
tree709b6ca9495c832856f54e03bc4db3055c861cb0 /py/obj.h
parent8f86fbfd6c34a4d03f2bd62e9dc1ff59c236b037 (diff)
py/objgenerator: Eliminate need for mp_obj_gen_wrap wrapper instances.
For generating functions there is no need to wrap the bytecode function in a generator wrapper instance. Instead the type of the bytecode function can be changed to mp_type_gen_wrap. This reduces code size and saves a block of GC heap RAM for each generator.
Diffstat (limited to 'py/obj.h')
-rw-r--r--py/obj.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/py/obj.h b/py/obj.h
index a64cd0f69..54bc98005 100644
--- a/py/obj.h
+++ b/py/obj.h
@@ -547,6 +547,7 @@ extern const mp_obj_type_t mp_type_slice;
extern const mp_obj_type_t mp_type_zip;
extern const mp_obj_type_t mp_type_array;
extern const mp_obj_type_t mp_type_super;
+extern const mp_obj_type_t mp_type_gen_wrap;
extern const mp_obj_type_t mp_type_gen_instance;
extern const mp_obj_type_t mp_type_fun_builtin_0;
extern const mp_obj_type_t mp_type_fun_builtin_1;