From 76d982ef343dcadd35355aed9c568984c850fb7b Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Mon, 13 Jan 2014 19:19:16 +0200 Subject: type->print(): Distinguish str() and repr() variety by passing extra param. --- unix/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'unix/main.c') diff --git a/unix/main.c b/unix/main.c index 15a4000ab5..e96ee28464 100644 --- a/unix/main.c +++ b/unix/main.c @@ -63,7 +63,7 @@ static void execute_from_lexer(mp_lexer_t *lex, mp_parse_input_kind_t input_kind nlr_pop(); } else { // uncaught exception - mp_obj_print((mp_obj_t)nlr.ret_val); + mp_obj_print((mp_obj_t)nlr.ret_val, PRINT_REPR); printf("\n"); } } @@ -159,7 +159,7 @@ typedef struct _test_obj_t { int value; } test_obj_t; -static void test_print(void (*print)(void *env, const char *fmt, ...), void *env, mp_obj_t self_in) { +static void test_print(void (*print)(void *env, const char *fmt, ...), void *env, mp_obj_t self_in, mp_print_kind_t kind) { test_obj_t *self = self_in; print(env, "", self->value); } -- cgit v1.2.3