diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2023-01-14 23:13:48 -0700 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2023-01-14 23:13:48 -0700 |
commit | 7a6e249a32f79331bfb5e29bc0cabcf89a026081 (patch) | |
tree | 27a7354ec18448e4090ac91581534baa7b537254 /src/nvim/eval/encode.h | |
parent | 442d4e54c30b8e193e3f6e4d32b43e96815bccd7 (diff) | |
parent | 6134c1e8a39a5e61d0593613343a5923a86e3545 (diff) | |
download | rneovim-7a6e249a32f79331bfb5e29bc0cabcf89a026081.tar.gz rneovim-7a6e249a32f79331bfb5e29bc0cabcf89a026081.tar.bz2 rneovim-7a6e249a32f79331bfb5e29bc0cabcf89a026081.zip |
Merge remote-tracking branch 'upstream/master' into usermarks
Diffstat (limited to 'src/nvim/eval/encode.h')
-rw-r--r-- | src/nvim/eval/encode.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/nvim/eval/encode.h b/src/nvim/eval/encode.h index 8755ff48ac..e66dab1cff 100644 --- a/src/nvim/eval/encode.h +++ b/src/nvim/eval/encode.h @@ -2,11 +2,14 @@ #define NVIM_EVAL_ENCODE_H #include <msgpack.h> +#include <msgpack/pack.h> #include <stddef.h> #include "nvim/eval.h" +#include "nvim/eval/typval.h" +#include "nvim/eval/typval_defs.h" #include "nvim/garray.h" -#include "nvim/vim.h" // For STRLEN +#include "nvim/vim.h" /// Convert VimL value to msgpack string /// @@ -15,9 +18,7 @@ /// @param[in] objname Object name, used for error message. /// /// @return OK in case of success, FAIL otherwise. -int encode_vim_to_msgpack(msgpack_packer *const packer, - typval_T *const tv, - const char *const objname); +int encode_vim_to_msgpack(msgpack_packer *packer, typval_T *tv, const char *objname); /// Convert VimL value to :echo output /// @@ -26,9 +27,7 @@ int encode_vim_to_msgpack(msgpack_packer *const packer, /// @param[in] objname Object name, used for error message. /// /// @return OK in case of success, FAIL otherwise. -int encode_vim_to_echo(garray_T *const packer, - typval_T *const tv, - const char *const objname); +int encode_vim_to_echo(garray_T *packer, typval_T *tv, const char *objname); /// Structure defining state for read_from_list() typedef struct { @@ -48,7 +47,7 @@ static inline ListReaderState encode_init_lrstate(const list_T *const list) .offset = 0, .li_length = (TV_LIST_ITEM_TV(tv_list_first(list))->vval.v_string == NULL ? 0 - : STRLEN(TV_LIST_ITEM_TV(tv_list_first(list))->vval.v_string)), + : strlen(TV_LIST_ITEM_TV(tv_list_first(list))->vval.v_string)), }; } |