comparison src/dict.c @ 15146:7903dce131d4 v8.1.0583

patch 8.1.0583: using illogical name for get_dict_number()/get_dict_string() commit https://github.com/vim/vim/commit/8f66717a1f835b8194139d158c1e2df8b30c3ef3 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Dec 14 15:38:31 2018 +0100 patch 8.1.0583: using illogical name for get_dict_number()/get_dict_string() Problem: Using illogical name for get_dict_number()/get_dict_string(). Solution: Rename to start with dict_.
author Bram Moolenaar <Bram@vim.org>
date Fri, 14 Dec 2018 15:45:06 +0100
parents c338c91086b9
children de63593896b3
comparison
equal deleted inserted replaced
15145:14de49f92ace 15146:7903dce131d4
485 * When "save" is TRUE allocate memory for it. 485 * When "save" is TRUE allocate memory for it.
486 * When FALSE a shared buffer is used, can only be used once! 486 * When FALSE a shared buffer is used, can only be used once!
487 * Returns NULL if the entry doesn't exist or out of memory. 487 * Returns NULL if the entry doesn't exist or out of memory.
488 */ 488 */
489 char_u * 489 char_u *
490 get_dict_string(dict_T *d, char_u *key, int save) 490 dict_get_string(dict_T *d, char_u *key, int save)
491 { 491 {
492 dictitem_T *di; 492 dictitem_T *di;
493 char_u *s; 493 char_u *s;
494 494
495 di = dict_find(d, key, -1); 495 di = dict_find(d, key, -1);
504 /* 504 /*
505 * Get a number item from a dictionary. 505 * Get a number item from a dictionary.
506 * Returns 0 if the entry doesn't exist. 506 * Returns 0 if the entry doesn't exist.
507 */ 507 */
508 varnumber_T 508 varnumber_T
509 get_dict_number(dict_T *d, char_u *key) 509 dict_get_number(dict_T *d, char_u *key)
510 { 510 {
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)
581 /* 581 /*
582 * Allocate a variable for a Dictionary and fill it from "*arg". 582 * Allocate a variable for a Dictionary and fill it from "*arg".
583 * Return OK or FAIL. Returns NOTDONE for {expr}. 583 * Return OK or FAIL. Returns NOTDONE for {expr}.
584 */ 584 */
585 int 585 int
586 get_dict_tv(char_u **arg, typval_T *rettv, int evaluate) 586 dict_get_tv(char_u **arg, typval_T *rettv, int evaluate)
587 { 587 {
588 dict_T *d = NULL; 588 dict_T *d = NULL;
589 typval_T tvkey; 589 typval_T tvkey;
590 typval_T tv; 590 typval_T tv;
591 char_u *key = NULL; 591 char_u *key = NULL;