summaryrefslogtreecommitdiff
path: root/py/objstr.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-09-03 23:01:07 +0100
committerDamien George <damien.p.george@gmail.com>2015-09-03 23:01:07 +0100
commit516982242df9eff369f5b2eb9e320f48ba19cdc2 (patch)
tree5ce3587b97bde88fa09e01a0549a8e97194aadc9 /py/objstr.c
parent8bf00084b6385d497510d76226d01a47ed1f2924 (diff)
py: Inline single use of mp_obj_str_get_len in mp_obj_len_maybe.
Gets rid of redundant double check for string type. Also remove obsolete declaration of mp_obj_str_get_hash.
Diffstat (limited to 'py/objstr.c')
-rw-r--r--py/objstr.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/py/objstr.c b/py/objstr.c
index f1e4e6b7b..42a1d5c5d 100644
--- a/py/objstr.c
+++ b/py/objstr.c
@@ -1996,16 +1996,6 @@ STATIC void bad_implicit_conversion(mp_obj_t self_in) {
}
}
-mp_uint_t mp_obj_str_get_len(mp_obj_t self_in) {
- // TODO This has a double check for the type, one in obj.c and one here
- if (MP_OBJ_IS_STR_OR_BYTES(self_in)) {
- GET_STR_LEN(self_in, l);
- return l;
- } else {
- bad_implicit_conversion(self_in);
- }
-}
-
// use this if you will anyway convert the string to a qstr
// will be more efficient for the case where it's already a qstr
qstr mp_obj_str_get_qstr(mp_obj_t self_in) {