diff options
author | ZyX <kp-pav@yandex.ru> | 2017-04-13 19:16:32 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-04-14 23:58:46 +0300 |
commit | b2942d1e729c4cfa8ec9d3bedcdc7ad838a689ef (patch) | |
tree | 77393686e3a0c7b5d12a1b4748f282b62fafe73b /src/nvim/eval/typval.h | |
parent | 58d2ce9bdbb6feab7176f451ca0248c78606aa2e (diff) | |
download | rneovim-b2942d1e729c4cfa8ec9d3bedcdc7ad838a689ef.tar.gz rneovim-b2942d1e729c4cfa8ec9d3bedcdc7ad838a689ef.tar.bz2 rneovim-b2942d1e729c4cfa8ec9d3bedcdc7ad838a689ef.zip |
eval: Change the point at which arg_errmsg and its length are changed
Ref #6437
Diffstat (limited to 'src/nvim/eval/typval.h')
-rw-r--r-- | src/nvim/eval/typval.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/nvim/eval/typval.h b/src/nvim/eval/typval.h index 7eab22bc12..df46222067 100644 --- a/src/nvim/eval/typval.h +++ b/src/nvim/eval/typval.h @@ -423,6 +423,17 @@ static inline bool tv_is_func(const typval_T tv) return tv.v_type == VAR_FUNC || tv.v_type == VAR_PARTIAL; } +/// Specify that argument needs to be translated +/// +/// Used for size_t length arguments to avoid calling gettext() and strlen() +/// unless needed. +#define TV_TRANSLATE (SIZE_MAX) + +/// Specify that argument is a NUL-terminated C string +/// +/// Used for size_t length arguments to avoid calling strlen() unless needed. +#define TV_CSTRING (SIZE_MAX - 1) + #ifdef INCLUDE_GENERATED_DECLARATIONS # include "eval/typval.h.generated.h" #endif |