From 069654f2be1ae370cf32a4e711f252a74326cc56 Mon Sep 17 00:00:00 2001
From: Paul Sokolovsky <pfalcon@users.sourceforge.net>
Date: Mon, 4 Apr 2016 15:35:44 +0300
Subject: [PATCH] py/obj.h: Add comment why mp_fun_kw_t takes non-const
 mp_map_t*.

mp_fun_kw_t takes mp_map_t* (and not const mp_map_t*) to ease passing
this arg to mp_map_lookup(), which may modify its arg, depending on
flags.
---
 py/obj.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/py/obj.h b/py/obj.h
index 6959821cf..8286ba447 100644
--- a/py/obj.h
+++ b/py/obj.h
@@ -398,6 +398,8 @@ typedef mp_obj_t (*mp_fun_1_t)(mp_obj_t);
 typedef mp_obj_t (*mp_fun_2_t)(mp_obj_t, mp_obj_t);
 typedef mp_obj_t (*mp_fun_3_t)(mp_obj_t, mp_obj_t, mp_obj_t);
 typedef mp_obj_t (*mp_fun_var_t)(size_t n, const mp_obj_t *);
+// mp_fun_kw_t takes mp_map_t* (and not const mp_map_t*) to ease passing
+// this arg to mp_map_lookup().
 typedef mp_obj_t (*mp_fun_kw_t)(size_t n, const mp_obj_t *, mp_map_t *);
 
 typedef enum {
-- 
GitLab