summaryrefslogtreecommitdiffstatshomepage
path: root/py/obj.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-03-26 19:27:58 +0000
committerDamien George <damien.p.george@gmail.com>2014-03-26 19:27:58 +0000
commit66eaf84b8c2db6afad7ec49eb296a019a2f377df (patch)
treea05406b020ba4102ffd90fdfb5357a301b9de637 /py/obj.h
parent688e220d268609ec1a5be7a9b532637fe8c1f765 (diff)
downloadmicropython-66eaf84b8c2db6afad7ec49eb296a019a2f377df.tar.gz
micropython-66eaf84b8c2db6afad7ec49eb296a019a2f377df.zip
py: Replace mp_const_stop_iteration object with MP_OBJ_NULL.
Diffstat (limited to 'py/obj.h')
-rw-r--r--py/obj.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/py/obj.h b/py/obj.h
index 19d32198b1..7c3ef8c55b 100644
--- a/py/obj.h
+++ b/py/obj.h
@@ -152,7 +152,7 @@ struct _mp_obj_type_t {
mp_store_item_fun_t store_item;
mp_fun_1_t getiter;
- mp_fun_1_t iternext;
+ mp_fun_1_t iternext; // may return MP_OBJ_NULL as an optimisation instead of raising StopIteration() (with no args)
// Alternatively, pointer(s) to interfaces to save space
// in mp_obj_type_t at the expense of extra pointer and extra dereference
@@ -221,7 +221,6 @@ extern const mp_obj_t mp_const_false;
extern const mp_obj_t mp_const_true;
extern const mp_obj_t mp_const_empty_tuple;
extern const mp_obj_t mp_const_ellipsis;
-extern const mp_obj_t mp_const_stop_iteration; // special object indicating end of iteration (not StopIteration exception!)
// General API for objects