diff options
author | ZyX <kp-pav@yandex.ru> | 2016-08-20 22:24:34 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-03-29 10:07:42 +0300 |
commit | e18a5783080f7c94f408ec5f53dedffdb69789e1 (patch) | |
tree | 17f54dfabb1163f2defce7989b3a182b846334f9 /src/nvim/macros.h | |
parent | 50a48f2a0ecf7f767df961f7f5060505cf28e331 (diff) | |
download | rneovim-e18a5783080f7c94f408ec5f53dedffdb69789e1.tar.gz rneovim-e18a5783080f7c94f408ec5f53dedffdb69789e1.tar.bz2 rneovim-e18a5783080f7c94f408ec5f53dedffdb69789e1.zip |
*: Move some dictionary functions to typval.h and use char*
Also fixes buffer reusage in setmatches() and complete().
Diffstat (limited to 'src/nvim/macros.h')
-rw-r--r-- | src/nvim/macros.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/nvim/macros.h b/src/nvim/macros.h index 650bf76156..5042663041 100644 --- a/src/nvim/macros.h +++ b/src/nvim/macros.h @@ -19,6 +19,15 @@ # define MAX(X, Y) ((X) > (Y) ? (X) : (Y)) #endif +/// String with length +/// +/// For use in functions which accept (char *s, size_t len) pair in arguments. +/// +/// @param[in] s Static string. +/// +/// @return `s, sizeof(s) - 1` +#define S_LEN(s) (s), (sizeof(s) - 1) + /* * Position comparisons */ |