Mercurial > vim
comparison src/dict.c @ 15211:de63593896b3 v8.1.0615
patch 8.1.0615: get_tv function names are not consistent
commit https://github.com/vim/vim/commit/d155d7a8519987361169459b8d464ae1caef5e9c
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Dec 21 16:04:21 2018 +0100
patch 8.1.0615: get_tv function names are not consistent
Problem: Get_tv function names are not consistent.
Solution: Rename to tv_get.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 21 Dec 2018 16:15:06 +0100 |
parents | 7903dce131d4 |
children | 762fccd84b7c |
comparison
equal
deleted
inserted
replaced
15210:fbb2936c39b6 | 15211:de63593896b3 |
---|---|
493 char_u *s; | 493 char_u *s; |
494 | 494 |
495 di = dict_find(d, key, -1); | 495 di = dict_find(d, key, -1); |
496 if (di == NULL) | 496 if (di == NULL) |
497 return NULL; | 497 return NULL; |
498 s = get_tv_string(&di->di_tv); | 498 s = tv_get_string(&di->di_tv); |
499 if (save && s != NULL) | 499 if (save && s != NULL) |
500 s = vim_strsave(s); | 500 s = vim_strsave(s); |
501 return s; | 501 return s; |
502 } | 502 } |
503 | 503 |
511 dictitem_T *di; | 511 dictitem_T *di; |
512 | 512 |
513 di = dict_find(d, key, -1); | 513 di = dict_find(d, key, -1); |
514 if (di == NULL) | 514 if (di == NULL) |
515 return 0; | 515 return 0; |
516 return get_tv_number(&di->di_tv); | 516 return tv_get_number(&di->di_tv); |
517 } | 517 } |
518 | 518 |
519 /* | 519 /* |
520 * Return an allocated string with the string representation of a Dictionary. | 520 * Return an allocated string with the string representation of a Dictionary. |
521 * May return NULL. | 521 * May return NULL. |
628 clear_tv(&tvkey); | 628 clear_tv(&tvkey); |
629 goto failret; | 629 goto failret; |
630 } | 630 } |
631 if (evaluate) | 631 if (evaluate) |
632 { | 632 { |
633 key = get_tv_string_buf_chk(&tvkey, buf); | 633 key = tv_get_string_buf_chk(&tvkey, buf); |
634 if (key == NULL) | 634 if (key == NULL) |
635 { | 635 { |
636 /* "key" is NULL when get_tv_string_buf_chk() gave an errmsg */ | 636 /* "key" is NULL when tv_get_string_buf_chk() gave an errmsg */ |
637 clear_tv(&tvkey); | 637 clear_tv(&tvkey); |
638 goto failret; | 638 goto failret; |
639 } | 639 } |
640 } | 640 } |
641 | 641 |