summaryrefslogtreecommitdiffstatshomepage
path: root/py/objlist.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-01-21 21:40:13 +0000
committerDamien George <damien.p.george@gmail.com>2014-01-21 21:40:13 +0000
commit55baff4c9bcbc001cbb8972c289ebfa356d4665b (patch)
treebd086f9ddf8c5f2db9642ee04fc382064ebd2029 /py/objlist.c
parent91d457a27752fa125e9c6107bf51c918e021dc95 (diff)
downloadmicropython-55baff4c9bcbc001cbb8972c289ebfa356d4665b.tar.gz
micropython-55baff4c9bcbc001cbb8972c289ebfa356d4665b.zip
Revamp qstrs: they now include length and hash.
Can now have null bytes in strings. Can define ROM qstrs per port using qstrdefsport.h
Diffstat (limited to 'py/objlist.c')
-rw-r--r--py/objlist.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/py/objlist.c b/py/objlist.c
index 0ad7b68799..bc363d38fd 100644
--- a/py/objlist.c
+++ b/py/objlist.c
@@ -6,7 +6,7 @@
#include "nlr.h"
#include "misc.h"
#include "mpconfig.h"
-#include "mpqstr.h"
+#include "qstr.h"
#include "obj.h"
#include "map.h"
#include "runtime0.h"
@@ -259,8 +259,8 @@ mp_obj_t mp_obj_list_sort(uint n_args, const mp_obj_t *args, mp_map_t *kwargs) {
}
mp_obj_list_t *self = args[0];
if (self->len > 1) {
- mp_map_elem_t *keyfun = mp_map_lookup(kwargs, MP_OBJ_NEW_QSTR(qstr_from_str_static("key")), MP_MAP_LOOKUP);
- mp_map_elem_t *reverse = mp_map_lookup(kwargs, MP_OBJ_NEW_QSTR(qstr_from_str_static("reverse")), MP_MAP_LOOKUP);
+ mp_map_elem_t *keyfun = mp_map_lookup(kwargs, MP_OBJ_NEW_QSTR(QSTR_FROM_STR_STATIC("key")), MP_MAP_LOOKUP);
+ mp_map_elem_t *reverse = mp_map_lookup(kwargs, MP_OBJ_NEW_QSTR(QSTR_FROM_STR_STATIC("reverse")), MP_MAP_LOOKUP);
mp_quicksort(self->items, self->items + self->len - 1,
keyfun ? keyfun->value : NULL,
reverse && reverse->value ? rt_is_true(reverse->value) : false);