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/objslice.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/objslice.c')
-rw-r--r-- | py/objslice.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/py/objslice.c b/py/objslice.c index d95ccef06f..8abcea08d0 100644 --- a/py/objslice.c +++ b/py/objslice.c @@ -16,7 +16,7 @@ typedef struct _mp_obj_ellipsis_t { mp_obj_base_t base; } mp_obj_ellipsis_t; -void ellipsis_print(void (*print)(void *env, const char *fmt, ...), void *env, mp_obj_t self_in) { +void ellipsis_print(void (*print)(void *env, const char *fmt, ...), void *env, mp_obj_t self_in, mp_print_kind_t kind) { print(env, "Ellipsis"); } @@ -42,7 +42,7 @@ typedef struct _mp_obj_slice_t { machine_int_t stop; } mp_obj_slice_t; -void slice_print(void (*print)(void *env, const char *fmt, ...), void *env, mp_obj_t o_in) { +void slice_print(void (*print)(void *env, const char *fmt, ...), void *env, mp_obj_t o_in, mp_print_kind_t kind) { mp_obj_slice_t *o = o_in; print(env, "slice(" INT_FMT ", " INT_FMT ")", o->start, o->stop); } |