Skip to content

Commit 069654f

Browse files
committed
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.
1 parent cee8882 commit 069654f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

py/obj.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,8 @@ typedef mp_obj_t (*mp_fun_1_t)(mp_obj_t);
398398
typedef mp_obj_t (*mp_fun_2_t)(mp_obj_t, mp_obj_t);
399399
typedef mp_obj_t (*mp_fun_3_t)(mp_obj_t, mp_obj_t, mp_obj_t);
400400
typedef mp_obj_t (*mp_fun_var_t)(size_t n, const mp_obj_t *);
401+
// mp_fun_kw_t takes mp_map_t* (and not const mp_map_t*) to ease passing
402+
// this arg to mp_map_lookup().
401403
typedef mp_obj_t (*mp_fun_kw_t)(size_t n, const mp_obj_t *, mp_map_t *);
402404

403405
typedef enum {

0 commit comments

Comments
 (0)