diff options
author | ZyX <kp-pav@yandex.ru> | 2016-08-21 08:16:47 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-03-29 10:08:05 +0300 |
commit | 28dafe3ff0b0dc082fb62b2251fd64a167ce7188 (patch) | |
tree | ea9d18e94f1a3bc01ef9b18614c5d3caa4dea12c /src/nvim/version.c | |
parent | 5cdf7177ec71e4b9b3295ead93bedf7ff226a2b2 (diff) | |
download | rneovim-28dafe3ff0b0dc082fb62b2251fd64a167ce7188.tar.gz rneovim-28dafe3ff0b0dc082fb62b2251fd64a167ce7188.tar.bz2 rneovim-28dafe3ff0b0dc082fb62b2251fd64a167ce7188.zip |
eval,*: Move get_tv_string to typval.c
Function was renamed and changed to return `const char *`.
Diffstat (limited to 'src/nvim/version.c')
-rw-r--r-- | src/nvim/version.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/version.c b/src/nvim/version.c index dd583f6ffd..f1d39b8492 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -73,7 +73,7 @@ static char *features[] = { }; // clang-format off -static int included_patches[] = { +static const int included_patches[] = { // 2367,NA // 2366 NA // 2365 NA @@ -2461,10 +2461,10 @@ static char *(extra_patches[]) = { /// @param version Version string like "1.3.42" /// /// @return true if Nvim is at or above the version. -bool has_nvim_version(char *version_str) - FUNC_ATTR_NONNULL_ALL +bool has_nvim_version(const char *const version_str) + FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ALL { - char *p = version_str; + const char *p = version_str; int major = 0; int minor = 0; int patch = 0; @@ -2473,7 +2473,7 @@ bool has_nvim_version(char *version_str) return false; } major = atoi(p); - p = strchr(p, '.'); // Find the next dot. + p = strchr(p, '.'); // Find the next dot. if (p) { p++; // Advance past the dot. @@ -2481,7 +2481,7 @@ bool has_nvim_version(char *version_str) return false; } minor = atoi(p); - p = strchr(p, '.'); + p = strchr(p, '.'); if (p) { p++; if (!ascii_isdigit(*p)) { |