summaryrefslogtreecommitdiff
path: root/py/obj.h
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-06-05 20:02:15 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-06-05 20:06:15 +0300
commit75ce9256b2c70bceee6ced26ac7c7bcbd1f1d7f4 (patch)
treee397a2e3c922a3e3290b022157296e232eb6b556 /py/obj.h
parent1e82ef3ae8fd8c7570b3c2094fa8b129b354dcdd (diff)
objstr: Implement "%(key)s" % {} formatting for strings and dicts.
Also, make sure that args to "*" format specifiers are bounds-checked properly and don't lead for segfaults in case of mismatch.
Diffstat (limited to 'py/obj.h')
-rw-r--r--py/obj.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/py/obj.h b/py/obj.h
index 7c8371511..aa78b2a22 100644
--- a/py/obj.h
+++ b/py/obj.h
@@ -505,6 +505,7 @@ typedef struct _mp_obj_dict_t {
} mp_obj_dict_t;
void mp_obj_dict_init(mp_obj_dict_t *dict, int n_args);
uint mp_obj_dict_len(mp_obj_t self_in);
+mp_obj_t mp_obj_dict_get(mp_obj_t self_in, mp_obj_t index);
mp_obj_t mp_obj_dict_store(mp_obj_t self_in, mp_obj_t key, mp_obj_t value);
mp_obj_t mp_obj_dict_delete(mp_obj_t self_in, mp_obj_t key);
mp_map_t *mp_obj_dict_get_map(mp_obj_t self_in);