diff options
author | John R. Lenton <jlenton@gmail.com> | 2014-01-07 23:06:46 +0000 |
---|---|---|
committer | John R. Lenton <jlenton@gmail.com> | 2014-01-07 23:06:46 +0000 |
commit | 9c83ec0edac2394431a5d1aecba1d666ffdea0a3 (patch) | |
tree | ccf18860da373cf13194788b793a962335d69fef /py/objrange.c | |
parent | 27d4ca7693c276d09a911c00c3442729c516dc23 (diff) | |
download | micropython-9c83ec0edac2394431a5d1aecba1d666ffdea0a3.tar.gz micropython-9c83ec0edac2394431a5d1aecba1d666ffdea0a3.zip |
Merge remote-tracking branch 'upstream/master' into dict_feats
Diffstat (limited to 'py/objrange.c')
-rw-r--r-- | py/objrange.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/py/objrange.c b/py/objrange.c index 1ef42673f4..a2a0e67b00 100644 --- a/py/objrange.c +++ b/py/objrange.c @@ -25,14 +25,7 @@ mp_obj_t range_getiter(mp_obj_t o_in) { static const mp_obj_type_t range_type = { { &mp_const_type} , "range", - NULL, // print - NULL, // make_new - NULL, // call_n - NULL, // unary_op - NULL, // binary_op - range_getiter, - NULL, // iternext - .methods = {{NULL, NULL},}, + .getiter = range_getiter, }; // range is a class and instances are immutable sequence objects @@ -70,14 +63,7 @@ mp_obj_t range_it_iternext(mp_obj_t o_in) { static const mp_obj_type_t range_it_type = { { &mp_const_type }, "range_iterator", - NULL, // print - NULL, // make_new - NULL, // call_n - NULL, // unary_op - NULL, // binary_op - NULL, // getiter - range_it_iternext, - .methods = {{NULL, NULL},}, + .iternext = range_it_iternext, }; mp_obj_t mp_obj_new_range_iterator(int cur, int stop, int step) { |