aboutsummaryrefslogtreecommitdiff
path: root/py/objstr.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-05-25 22:34:34 +0100
committerDamien George <damien.p.george@gmail.com>2014-05-25 22:34:34 +0100
commitf600a6a0851bc2023e9322bac807f5d2217e8451 (patch)
tree6bcc71e3650af453838e5e54fbc1cc1c95623c3a /py/objstr.h
parent2617eebf2ff77e58f415162300747eaf1a5ab5d7 (diff)
py: Slightly improve efficiency of mp_obj_new_str; rename str_new.
Reorder interning logic in mp_obj_new_str, to be more efficient. str_new is globally accessible, so should be prefixed with mp_obj_.
Diffstat (limited to 'py/objstr.h')
-rw-r--r--py/objstr.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/objstr.h b/py/objstr.h
index c0ef701a8..5be137d36 100644
--- a/py/objstr.h
+++ b/py/objstr.h
@@ -36,4 +36,4 @@ typedef struct _mp_obj_str_t {
#define MP_DEFINE_STR_OBJ(obj_name, str) mp_obj_str_t obj_name = {{&mp_type_str}, 0, sizeof(str) - 1, (const byte*)str};
mp_obj_t mp_obj_str_format(uint n_args, const mp_obj_t *args);
-mp_obj_t str_new(const mp_obj_type_t *type, const byte* data, uint len);
+mp_obj_t mp_obj_new_str_of_type(const mp_obj_type_t *type, const byte* data, uint len);