aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/macros.h
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-03-29 23:15:07 +0200
committerGitHub <noreply@github.com>2017-03-29 23:15:07 +0200
commitc60e409471c51864883bd0b874980d0a8857f813 (patch)
tree64444c3f0210461e398654e3d6dd6f00e0091cd9 /src/nvim/macros.h
parentc35420558bed0bfa9938ecd1facec88f1df392a5 (diff)
parent46efe14473fa803f84509592cc1e8fca4eb20640 (diff)
downloadrneovim-c60e409471c51864883bd0b874980d0a8857f813.tar.gz
rneovim-c60e409471c51864883bd0b874980d0a8857f813.tar.bz2
rneovim-c60e409471c51864883bd0b874980d0a8857f813.zip
Merge #5119 from ZyX-I/split-eval
Diffstat (limited to 'src/nvim/macros.h')
-rw-r--r--src/nvim/macros.h9
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
*/