comparison src/dict.c @ 9770:ba98d7ce0d74 v7.4.2160

commit https://github.com/vim/vim/commit/7dc5e2e486fe0287601968e535902a41a39f65bb Author: Bram Moolenaar <Bram@vim.org> Date: Fri Aug 5 22:22:06 2016 +0200 patch 7.4.2160 Problem: setmatches() mixes up values. (Nikolai Pavlov) Solution: Save the string instead of reusing a shared buffer.
author Christian Brabandt <cb@256bit.org>
date Fri, 05 Aug 2016 22:30:07 +0200
parents 1e68dfd7931b
children 3e96d9ed2ca1
comparison
equal deleted inserted replaced
9769:c1c78c065e99 9770:ba98d7ce0d74
416 } 416 }
417 417
418 /* 418 /*
419 * Get a string item from a dictionary. 419 * Get a string item from a dictionary.
420 * When "save" is TRUE allocate memory for it. 420 * When "save" is TRUE allocate memory for it.
421 * When FALSE a shared buffer is used, can only be used once!
421 * Returns NULL if the entry doesn't exist or out of memory. 422 * Returns NULL if the entry doesn't exist or out of memory.
422 */ 423 */
423 char_u * 424 char_u *
424 get_dict_string(dict_T *d, char_u *key, int save) 425 get_dict_string(dict_T *d, char_u *key, int save)
425 { 426 {