diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-01-13 19:19:16 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-01-15 02:15:38 +0200 |
commit | 76d982ef343dcadd35355aed9c568984c850fb7b (patch) | |
tree | 1ded5f199ce740d3b72c00cc1e9c2b402936632f /py/objtuple.c | |
parent | 24224d7c72e1d6572ef0d24f08eb882dcac8dc50 (diff) | |
download | micropython-76d982ef343dcadd35355aed9c568984c850fb7b.tar.gz micropython-76d982ef343dcadd35355aed9c568984c850fb7b.zip |
type->print(): Distinguish str() and repr() variety by passing extra param.
Diffstat (limited to 'py/objtuple.c')
-rw-r--r-- | py/objtuple.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/py/objtuple.c b/py/objtuple.c index 15e74636f8..a64b1fa16c 100644 --- a/py/objtuple.c +++ b/py/objtuple.c @@ -16,14 +16,14 @@ static mp_obj_t mp_obj_new_tuple_iterator(mp_obj_tuple_t *tuple, int cur); /******************************************************************************/ /* tuple */ -void tuple_print(void (*print)(void *env, const char *fmt, ...), void *env, mp_obj_t o_in) { +void tuple_print(void (*print)(void *env, const char *fmt, ...), void *env, mp_obj_t o_in, mp_print_kind_t kind) { mp_obj_tuple_t *o = o_in; print(env, "("); for (int i = 0; i < o->len; i++) { if (i > 0) { print(env, ", "); } - mp_obj_print_helper(print, env, o->items[i]); + mp_obj_print_helper(print, env, o->items[i], PRINT_REPR); } if (o->len == 1) { print(env, ","); |