comparison src/match.c @ 29442:827d9f2b7a71 v9.0.0063

patch 9.0.0063: too many type casts for dict_get functions Commit: https://github.com/vim/vim/commit/d61efa50f8f5b9d9dcbc136705cc33874f0fdcb3 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jul 23 09:52:04 2022 +0100 patch 9.0.0063: too many type casts for dict_get functions Problem: Too many type casts for dict_get functions. Solution: Change the key argument from "char_u *" to "char *".
author Bram Moolenaar <Bram@vim.org>
date Sat, 23 Jul 2022 11:00:04 +0200
parents b66386af68f8
children 89e1d67814a9
comparison
equal deleted inserted replaced
29441:2a189fa0dcd7 29442:827d9f2b7a71
959 emsg(_(e_dictionary_required)); 959 emsg(_(e_dictionary_required));
960 return FAIL; 960 return FAIL;
961 } 961 }
962 962
963 if (dict_has_key(tv->vval.v_dict, "conceal")) 963 if (dict_has_key(tv->vval.v_dict, "conceal"))
964 *conceal_char = dict_get_string(tv->vval.v_dict, 964 *conceal_char = dict_get_string(tv->vval.v_dict, "conceal", FALSE);
965 (char_u *)"conceal", FALSE);
966 965
967 if ((di = dict_find(tv->vval.v_dict, (char_u *)"window", -1)) != NULL) 966 if ((di = dict_find(tv->vval.v_dict, (char_u *)"window", -1)) != NULL)
968 { 967 {
969 *win = find_win_by_nr_or_id(&di->di_tv); 968 *win = find_win_by_nr_or_id(&di->di_tv);
970 if (*win == NULL) 969 if (*win == NULL)
1159 else 1158 else
1160 break; 1159 break;
1161 } 1160 }
1162 } 1161 }
1163 1162
1164 group = dict_get_string(d, (char_u *)"group", TRUE); 1163 group = dict_get_string(d, "group", TRUE);
1165 priority = (int)dict_get_number(d, (char_u *)"priority"); 1164 priority = (int)dict_get_number(d, "priority");
1166 id = (int)dict_get_number(d, (char_u *)"id"); 1165 id = (int)dict_get_number(d, "id");
1167 conceal = dict_has_key(d, "conceal") 1166 conceal = dict_has_key(d, "conceal")
1168 ? dict_get_string(d, (char_u *)"conceal", TRUE) 1167 ? dict_get_string(d, "conceal", TRUE)
1169 : NULL; 1168 : NULL;
1170 if (i == 0) 1169 if (i == 0)
1171 { 1170 {
1172 match_add(win, group, 1171 match_add(win, group,
1173 dict_get_string(d, (char_u *)"pattern", FALSE), 1172 dict_get_string(d, "pattern", FALSE),
1174 priority, id, NULL, conceal); 1173 priority, id, NULL, conceal);
1175 } 1174 }
1176 else 1175 else
1177 { 1176 {
1178 match_add(win, group, NULL, priority, id, s, conceal); 1177 match_add(win, group, NULL, priority, id, s, conceal);