eval,*: Move get_tv_string to typval.c

Function was renamed and changed to return `const char *`.
This commit is contained in:
ZyX
2016-08-21 08:16:47 +03:00
parent 5cdf7177ec
commit 28dafe3ff0
28 changed files with 1072 additions and 992 deletions

View File

@@ -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)) {