Mercurial > vim
comparison src/sign.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 | 755ab148288b |
children | 89e1d67814a9 |
comparison
equal
deleted
inserted
replaced
29441:2a189fa0dcd7 | 29442:827d9f2b7a71 |
---|---|
2265 | 2265 |
2266 if (name_arg == NULL) | 2266 if (name_arg == NULL) |
2267 { | 2267 { |
2268 if (dict == NULL) | 2268 if (dict == NULL) |
2269 return -1; | 2269 return -1; |
2270 name = dict_get_string(dict, (char_u *)"name", TRUE); | 2270 name = dict_get_string(dict, "name", TRUE); |
2271 } | 2271 } |
2272 else | 2272 else |
2273 name = vim_strsave(name_arg); | 2273 name = vim_strsave(name_arg); |
2274 if (name == NULL || name[0] == NUL) | 2274 if (name == NULL || name[0] == NUL) |
2275 goto cleanup; | 2275 goto cleanup; |
2276 if (dict != NULL) | 2276 if (dict != NULL) |
2277 { | 2277 { |
2278 icon = dict_get_string(dict, (char_u *)"icon", TRUE); | 2278 icon = dict_get_string(dict, "icon", TRUE); |
2279 linehl = dict_get_string(dict, (char_u *)"linehl", TRUE); | 2279 linehl = dict_get_string(dict, "linehl", TRUE); |
2280 text = dict_get_string(dict, (char_u *)"text", TRUE); | 2280 text = dict_get_string(dict, "text", TRUE); |
2281 texthl = dict_get_string(dict, (char_u *)"texthl", TRUE); | 2281 texthl = dict_get_string(dict, "texthl", TRUE); |
2282 culhl = dict_get_string(dict, (char_u *)"culhl", TRUE); | 2282 culhl = dict_get_string(dict, "culhl", TRUE); |
2283 numhl = dict_get_string(dict, (char_u *)"numhl", TRUE); | 2283 numhl = dict_get_string(dict, "numhl", TRUE); |
2284 } | 2284 } |
2285 | 2285 |
2286 if (sign_define_by_name(name, icon, linehl, text, texthl, culhl, numhl) == OK) | 2286 if (sign_define_by_name(name, icon, linehl, text, texthl, culhl, numhl) == OK) |
2287 retval = 0; | 2287 retval = 0; |
2288 | 2288 |
2763 | 2763 |
2764 // sign group | 2764 // sign group |
2765 if (group_tv != NULL) | 2765 if (group_tv != NULL) |
2766 group = tv_get_string(group_tv); | 2766 group = tv_get_string(group_tv); |
2767 else | 2767 else |
2768 group = dict_get_string(dict, (char_u *)"group", FALSE); | 2768 group = dict_get_string(dict, "group", FALSE); |
2769 if (group != NULL) | 2769 if (group != NULL) |
2770 { | 2770 { |
2771 if (group[0] == '\0') // global sign group | 2771 if (group[0] == '\0') // global sign group |
2772 group = NULL; | 2772 group = NULL; |
2773 else | 2773 else |
2786 if (buf == NULL) | 2786 if (buf == NULL) |
2787 goto cleanup; | 2787 goto cleanup; |
2788 } | 2788 } |
2789 if (dict_has_key(dict, "id")) | 2789 if (dict_has_key(dict, "id")) |
2790 { | 2790 { |
2791 sign_id = dict_get_number(dict, (char_u *)"id"); | 2791 sign_id = dict_get_number(dict, "id"); |
2792 if (sign_id <= 0) | 2792 if (sign_id <= 0) |
2793 { | 2793 { |
2794 emsg(_(e_invalid_argument)); | 2794 emsg(_(e_invalid_argument)); |
2795 goto cleanup; | 2795 goto cleanup; |
2796 } | 2796 } |