comparison src/alloc.c @ 28813:3626ca6a20ea v8.2.4930

patch 8.2.4930: interpolated string expression requires escaping Commit: https://github.com/vim/vim/commit/0abc2871c105882ed1c1effb9a7757fad8a395bd Author: Bram Moolenaar <Bram@vim.org> Date: Tue May 10 13:24:30 2022 +0100 patch 8.2.4930: interpolated string expression requires escaping Problem: Interpolated string expression requires escaping. Solution: Do not require escaping in the expression.
author Bram Moolenaar <Bram@vim.org>
date Tue, 10 May 2022 14:30:04 +0200
parents f24d4826e6bf
children 5ebc561444fe
comparison
equal deleted inserted replaced
28812:483371d05cd5 28813:3626ca6a20ea
830 return OK; 830 return OK;
831 } 831 }
832 832
833 /* 833 /*
834 * Concatenate a string to a growarray which contains bytes. 834 * Concatenate a string to a growarray which contains bytes.
835 * When "s" is NULL does not do anything. 835 * When "s" is NULL memory allocation fails does not do anything.
836 * Note: Does NOT copy the NUL at the end! 836 * Note: Does NOT copy the NUL at the end!
837 */ 837 */
838 void 838 void
839 ga_concat(garray_T *gap, char_u *s) 839 ga_concat(garray_T *gap, char_u *s)
840 { 840 {
867 } 867 }
868 868
869 /* 869 /*
870 * Append one byte to a growarray which contains bytes. 870 * Append one byte to a growarray which contains bytes.
871 */ 871 */
872 void 872 int
873 ga_append(garray_T *gap, int c) 873 ga_append(garray_T *gap, int c)
874 { 874 {
875 if (ga_grow(gap, 1) == OK) 875 if (ga_grow(gap, 1) == FAIL)
876 { 876 return FAIL;
877 *((char *)gap->ga_data + gap->ga_len) = c; 877 *((char *)gap->ga_data + gap->ga_len) = c;
878 ++gap->ga_len; 878 ++gap->ga_len;
879 } 879 return OK;
880 } 880 }
881 881
882 #if (defined(UNIX) && !defined(USE_SYSTEM)) || defined(MSWIN) \ 882 #if (defined(UNIX) && !defined(USE_SYSTEM)) || defined(MSWIN) \
883 || defined(PROTO) 883 || defined(PROTO)
884 /* 884 /*