Mercurial > vim
comparison src/evalfunc.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 | 90565e49a13e |
children | 057c26b5c33a |
comparison
equal
deleted
inserted
replaced
29441:2a189fa0dcd7 | 29442:827d9f2b7a71 |
---|---|
4215 && (check_for_string_arg(argvars, 0) == FAIL | 4215 && (check_for_string_arg(argvars, 0) == FAIL |
4216 || check_for_opt_dict_arg(argvars, 1) == FAIL)) | 4216 || check_for_opt_dict_arg(argvars, 1) == FAIL)) |
4217 return; | 4217 return; |
4218 | 4218 |
4219 if (argvars[1].v_type == VAR_DICT | 4219 if (argvars[1].v_type == VAR_DICT |
4220 && dict_get_bool(argvars[1].vval.v_dict, (char_u *)"errmsg", | 4220 && dict_get_bool(argvars[1].vval.v_dict, "errmsg", VVAL_FALSE)) |
4221 VVAL_FALSE)) | |
4222 emsgoff = FALSE; | 4221 emsgoff = FALSE; |
4223 | 4222 |
4224 rettv->v_type = VAR_STRING; | 4223 rettv->v_type = VAR_STRING; |
4225 cmdstr = vim_strsave(tv_get_string(&argvars[0])); | 4224 cmdstr = vim_strsave(tv_get_string(&argvars[0])); |
4226 | 4225 |
9170 return; | 9169 return; |
9171 } | 9170 } |
9172 | 9171 |
9173 if ((d = argvars[0].vval.v_dict) != NULL) | 9172 if ((d = argvars[0].vval.v_dict) != NULL) |
9174 { | 9173 { |
9175 csearch = dict_get_string(d, (char_u *)"char", FALSE); | 9174 csearch = dict_get_string(d, "char", FALSE); |
9176 if (csearch != NULL) | 9175 if (csearch != NULL) |
9177 { | 9176 { |
9178 if (enc_utf8) | 9177 if (enc_utf8) |
9179 { | 9178 { |
9180 int pcc[MAX_MCO]; | 9179 int pcc[MAX_MCO]; |
9366 | 9365 |
9367 di = dict_find(d, (char_u *)"regcontents", -1); | 9366 di = dict_find(d, (char_u *)"regcontents", -1); |
9368 if (di != NULL) | 9367 if (di != NULL) |
9369 regcontents = &di->di_tv; | 9368 regcontents = &di->di_tv; |
9370 | 9369 |
9371 stropt = dict_get_string(d, (char_u *)"regtype", FALSE); | 9370 stropt = dict_get_string(d, "regtype", FALSE); |
9372 if (stropt != NULL) | 9371 if (stropt != NULL) |
9373 { | 9372 { |
9374 int ret = get_yank_type(&stropt, &yank_type, &block_len); | 9373 int ret = get_yank_type(&stropt, &yank_type, &block_len); |
9375 | 9374 |
9376 if (ret == FAIL || *++stropt != NUL) | 9375 if (ret == FAIL || *++stropt != NUL) |
9380 } | 9379 } |
9381 } | 9380 } |
9382 | 9381 |
9383 if (regname == '"') | 9382 if (regname == '"') |
9384 { | 9383 { |
9385 stropt = dict_get_string(d, (char_u *)"points_to", FALSE); | 9384 stropt = dict_get_string(d, "points_to", FALSE); |
9386 if (stropt != NULL) | 9385 if (stropt != NULL) |
9387 { | 9386 { |
9388 pointreg = *stropt; | 9387 pointreg = *stropt; |
9389 regname = pointreg; | 9388 regname = pointreg; |
9390 } | 9389 } |
9391 } | 9390 } |
9392 else if (dict_get_bool(d, (char_u *)"isunnamed", -1) > 0) | 9391 else if (dict_get_bool(d, "isunnamed", -1) > 0) |
9393 pointreg = regname; | 9392 pointreg = regname; |
9394 } | 9393 } |
9395 else | 9394 else |
9396 regcontents = &argvars[1]; | 9395 regcontents = &argvars[1]; |
9397 | 9396 |