py/runtime: Remove unnecessary check for kw_value == MP_OBJ_NULL.

The values are always real objects, only the key can be MP_OBJ_NULL to
indicate a **kwargs entry.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George 2022-04-01 00:21:03 +11:00
parent bd556b6996
commit 40f5c743db
1 changed files with 1 additions and 3 deletions

View File

@ -828,9 +828,7 @@ void mp_call_prepare_args_n_kw_var(bool have_self, size_t n_args_n_kw, const mp_
mp_obj_t kw_value = args[n_args + i * 2 + 1];
if (kw_key == MP_OBJ_NULL) {
// double-star args
if (kw_value == MP_OBJ_NULL) {
// pass
} else if (mp_obj_is_type(kw_value, &mp_type_dict)) {
if (mp_obj_is_type(kw_value, &mp_type_dict)) {
// dictionary
mp_map_t *map = mp_obj_dict_get_map(kw_value);
// should have enough, since kw_dict_len is in this case hinted correctly above