comparison src/search.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 87980a7936e7
children 89e1d67814a9
comparison
equal deleted inserted replaced
29441:2a189fa0dcd7 29442:827d9f2b7a71
4113 { 4113 {
4114 maxcount = (int)tv_get_number_chk(&di->di_tv, &error); 4114 maxcount = (int)tv_get_number_chk(&di->di_tv, &error);
4115 if (error) 4115 if (error)
4116 return; 4116 return;
4117 } 4117 }
4118 recompute = dict_get_bool(dict, (char_u *)"recompute", recompute); 4118 recompute = dict_get_bool(dict, "recompute", recompute);
4119 di = dict_find(dict, (char_u *)"pattern", -1); 4119 di = dict_find(dict, (char_u *)"pattern", -1);
4120 if (di != NULL) 4120 if (di != NULL)
4121 { 4121 {
4122 pattern = tv_get_string_chk(&di->di_tv); 4122 pattern = tv_get_string_chk(&di->di_tv);
4123 if (pattern == NULL) 4123 if (pattern == NULL)
4643 && (key != NULL || item_cb->cb_name != NULL)) 4643 && (key != NULL || item_cb->cb_name != NULL))
4644 { 4644 {
4645 // For a dict, either use the specified key to lookup the string or 4645 // For a dict, either use the specified key to lookup the string or
4646 // use the specified callback function to get the string. 4646 // use the specified callback function to get the string.
4647 if (key != NULL) 4647 if (key != NULL)
4648 itemstr = dict_get_string(li->li_tv.vval.v_dict, key, FALSE); 4648 itemstr = dict_get_string(li->li_tv.vval.v_dict,
4649 (char *)key, FALSE);
4649 else 4650 else
4650 { 4651 {
4651 typval_T argv[2]; 4652 typval_T argv[2];
4652 4653
4653 // Invoke the supplied callback (if any) to get the dict item 4654 // Invoke the supplied callback (if any) to get the dict item