diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-01-05 22:34:09 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-01-05 22:34:09 +0200 |
commit | 860ffb0a4365bba62cbd692392375df9fd4a72e7 (patch) | |
tree | 6af9fda7e920151975b6681608ddaae4e0c039c1 /py/objtuple.c | |
parent | 12e2656472bf53e467c066eda6f3e177a97210ca (diff) |
Convert many object types structs to use C99 tagged initializer syntax.
Diffstat (limited to 'py/objtuple.c')
-rw-r--r-- | py/objtuple.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/py/objtuple.c b/py/objtuple.c index d55259d1a..ceca4200e 100644 --- a/py/objtuple.c +++ b/py/objtuple.c @@ -99,14 +99,11 @@ static mp_obj_t tuple_getiter(mp_obj_t o_in) { const mp_obj_type_t tuple_type = { { &mp_const_type }, "tuple", - tuple_print, // print - tuple_make_new, // make_new - NULL, // call_n - NULL, // unary_op - tuple_binary_op, // binary_op - tuple_getiter, // getiter - NULL, // iternext - {{NULL, NULL},}, // method list + .print = tuple_print, + .make_new = tuple_make_new, + .binary_op = tuple_binary_op, + .getiter = tuple_getiter, + .methods = {{NULL, NULL},}, }; // the zero-length tuple @@ -168,14 +165,8 @@ static mp_obj_t tuple_it_iternext(mp_obj_t self_in) { static const mp_obj_type_t tuple_it_type = { { &mp_const_type }, "tuple_iterator", - NULL, // print - NULL, // make_new - NULL, // call_n - NULL, // unary_op - NULL, // binary_op - NULL, // getiter - tuple_it_iternext, - {{NULL, NULL},}, // method list + .iternext = tuple_it_iternext, + .methods = {{NULL, NULL},}, }; static mp_obj_t mp_obj_new_tuple_iterator(mp_obj_tuple_t *tuple, int cur) { |