summaryrefslogtreecommitdiff
path: root/py/objlist.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2019-12-16 15:40:05 +1100
committerDamien George <damien.p.george@gmail.com>2019-12-27 22:51:17 +1100
commit09376f0e47b3ab4a5a2a3c2c768ff913e1835cc8 (patch)
tree4fd6399e318c977b3ddd20c13659f176b70f3f5b /py/objlist.c
parentf5eec903fa961135296e2656821450979e413248 (diff)
py: Introduce MP_ROM_NONE macro for ROM to refer to None object.
This helps to prevent mistakes, and allows easily changing the ROM value of None if needed.
Diffstat (limited to 'py/objlist.c')
-rw-r--r--py/objlist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/objlist.c b/py/objlist.c
index 29a1d8b1a..00afcd56a 100644
--- a/py/objlist.c
+++ b/py/objlist.c
@@ -312,7 +312,7 @@ STATIC void mp_quicksort(mp_obj_t *head, mp_obj_t *tail, mp_obj_t key_fn, mp_obj
// TODO Python defines sort to be stable but ours is not
mp_obj_t mp_obj_list_sort(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
static const mp_arg_t allowed_args[] = {
- { MP_QSTR_key, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_rom_obj = MP_ROM_PTR(&mp_const_none_obj)} },
+ { MP_QSTR_key, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_rom_obj = MP_ROM_NONE} },
{ MP_QSTR_reverse, MP_ARG_KW_ONLY | MP_ARG_BOOL, {.u_bool = false} },
};