aboutsummaryrefslogtreecommitdiff
path: root/py/runtime.c
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2022-04-01 00:21:03 +1100
committerDamien George <damien@micropython.org>2022-04-01 09:20:42 +1100
commit40f5c743db7f16a0b898fe1697c626e53aa6500d (patch)
tree6944f07d92c7b3e2390fe2641f2f782984aef4cb /py/runtime.c
parentbd556b69960cafc97353e736f825eca5c00b0c29 (diff)
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>
Diffstat (limited to 'py/runtime.c')
-rw-r--r--py/runtime.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/py/runtime.c b/py/runtime.c
index ad066acb1..2a07df664 100644
--- a/py/runtime.c
+++ b/py/runtime.c
@@ -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