diff options
author | ZyX <kp-pav@yandex.ru> | 2016-02-01 21:22:07 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2016-04-18 02:45:49 +0300 |
commit | e213ba150665328bae2b532491de5e12f72bc9ca (patch) | |
tree | 5baab21c126996e91aca54285498067f17831172 /src/nvim/encode.c | |
parent | 0f0e2bdfd4b99d678cbcd090505ae9ebf74233a2 (diff) | |
download | rneovim-e213ba150665328bae2b532491de5e12f72bc9ca.tar.gz rneovim-e213ba150665328bae2b532491de5e12f72bc9ca.tar.bz2 rneovim-e213ba150665328bae2b532491de5e12f72bc9ca.zip |
eval: Add jsondecode() function
Diffstat (limited to 'src/nvim/encode.c')
-rw-r--r-- | src/nvim/encode.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/nvim/encode.c b/src/nvim/encode.c index 2968c262ff..57163253c3 100644 --- a/src/nvim/encode.c +++ b/src/nvim/encode.c @@ -200,8 +200,8 @@ static int conv_error(const char *const msg, const MPConvStack *const mpstack, /// zero. /// /// @return true in case of success, false in case of failure. -static inline bool vim_list_to_buf(const list_T *const list, - size_t *const ret_len, char **const ret_buf) +bool encode_vim_list_to_buf(const list_T *const list, size_t *const ret_len, + char **const ret_buf) FUNC_ATTR_NONNULL_ARG(2,3) FUNC_ATTR_WARN_UNUSED_RESULT { size_t len = 0; @@ -457,7 +457,8 @@ static int name##_convert_one_value(firstargtype firstargname, \ } \ size_t len; \ char *buf; \ - if (!vim_list_to_buf(val_di->di_tv.vval.v_list, &len, &buf)) { \ + if (!encode_vim_list_to_buf(val_di->di_tv.vval.v_list, &len, \ + &buf)) { \ goto name##_convert_one_value_regular_dict; \ } \ if (is_string) { \ @@ -529,8 +530,8 @@ static int name##_convert_one_value(firstargtype firstargname, \ } \ size_t len; \ char *buf; \ - if (!vim_list_to_buf(val_list->lv_last->li_tv.vval.v_list, \ - &len, &buf)) { \ + if (!encode_vim_list_to_buf(val_list->lv_last->li_tv.vval.v_list, \ + &len, &buf)) { \ goto name##_convert_one_value_regular_dict; \ } \ CONV_EXT_STRING(buf, len, type); \ |