summaryrefslogtreecommitdiffstatshomepage
path: root/py/objdict.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-01-15 22:39:03 +0000
committerDamien George <damien.p.george@gmail.com>2014-01-15 22:39:03 +0000
commit4899ff9470734f0593bbe1f5272bc3d23facf7f7 (patch)
tree929b1674e445726b50e3ff2acc1e5706e9b8f5ea /py/objdict.c
parent7a9d0c454076b6524f3f6f5af9a6b28bc35da2f9 (diff)
parent36c4499d36a36ab3e1a68545e613bce61fb15f3c (diff)
downloadmicropython-4899ff9470734f0593bbe1f5272bc3d23facf7f7.tar.gz
micropython-4899ff9470734f0593bbe1f5272bc3d23facf7f7.zip
Merge branch 'str-repr' of github.com:pfalcon/micropython into pfalcon-str-repr
Conflicts: tests/basics/tests/exception1.py
Diffstat (limited to 'py/objdict.c')
-rw-r--r--py/objdict.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/py/objdict.c b/py/objdict.c
index e164ed74ca..da1b5b9f5b 100644
--- a/py/objdict.c
+++ b/py/objdict.c
@@ -20,7 +20,7 @@ typedef struct _mp_obj_dict_t {
static mp_obj_t mp_obj_new_dict_iterator(mp_obj_dict_t *dict, int cur);
static mp_map_elem_t *dict_it_iternext_elem(mp_obj_t self_in);
-static void dict_print(void (*print)(void *env, const char *fmt, ...), void *env, mp_obj_t self_in) {
+static void dict_print(void (*print)(void *env, const char *fmt, ...), void *env, mp_obj_t self_in, mp_print_kind_t kind) {
mp_obj_dict_t *self = self_in;
bool first = true;
print(env, "{");
@@ -31,9 +31,9 @@ static void dict_print(void (*print)(void *env, const char *fmt, ...), void *env
print(env, ", ");
}
first = false;
- mp_obj_print_helper(print, env, next->key);
+ mp_obj_print_helper(print, env, next->key, PRINT_REPR);
print(env, ": ");
- mp_obj_print_helper(print, env, next->value);
+ mp_obj_print_helper(print, env, next->value, PRINT_REPR);
}
print(env, "}");
}
@@ -350,7 +350,7 @@ static mp_obj_t dict_view_getiter(mp_obj_t view_in) {
return o;
}
-static void dict_view_print(void (*print)(void *env, const char *fmt, ...), void *env, mp_obj_t self_in) {
+static void dict_view_print(void (*print)(void *env, const char *fmt, ...), void *env, mp_obj_t self_in, mp_print_kind_t kind) {
assert(MP_OBJ_IS_TYPE(self_in, &dict_view_type));
mp_obj_dict_view_t *self = self_in;
bool first = true;
@@ -363,7 +363,7 @@ static void dict_view_print(void (*print)(void *env, const char *fmt, ...), void
print(env, ", ");
}
first = false;
- mp_obj_print_helper(print, env, next);
+ mp_obj_print_helper(print, env, next, PRINT_REPR);
}
print(env, "])");
}