summaryrefslogtreecommitdiff
path: root/py/objstr.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-04-15 22:03:55 +0100
committerDamien George <damien.p.george@gmail.com>2014-04-15 22:03:55 +0100
commit897fe0c0d0e29875cfa32939237c9a6255c5d044 (patch)
tree9dd2dc8ea2fd07c465b12d81b01c946b8e8120b7 /py/objstr.c
parentd5323f07ff79c20644ff64a247adad54b510a9a9 (diff)
py: Add builtin functions bin and oct, and some tests for them.
Diffstat (limited to 'py/objstr.c')
-rw-r--r--py/objstr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/py/objstr.c b/py/objstr.c
index fc1e1c569..0edc49909 100644
--- a/py/objstr.c
+++ b/py/objstr.c
@@ -579,7 +579,7 @@ static mp_obj_t arg_as_int(mp_obj_t arg) {
return arg;
}
-mp_obj_t str_format(uint n_args, const mp_obj_t *args) {
+mp_obj_t mp_obj_str_format(uint n_args, const mp_obj_t *args) {
assert(MP_OBJ_IS_STR(args[0]));
GET_STR_DATA_LEN(args[0], str, len);
@@ -1346,7 +1346,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(str_join_obj, str_join);
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(str_split_obj, 1, 3, str_split);
STATIC MP_DEFINE_CONST_FUN_OBJ_2(str_startswith_obj, str_startswith);
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(str_strip_obj, 1, 2, str_strip);
-STATIC MP_DEFINE_CONST_FUN_OBJ_VAR(str_format_obj, 1, str_format);
+STATIC MP_DEFINE_CONST_FUN_OBJ_VAR(str_format_obj, 1, mp_obj_str_format);
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(str_replace_obj, 3, 4, str_replace);
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(str_count_obj, 2, 4, str_count);
STATIC MP_DEFINE_CONST_FUN_OBJ_2(str_partition_obj, str_partition);