aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/path.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2016-04-17 20:24:23 -0400
committerJustin M. Keyes <justinkz@gmail.com>2016-04-17 20:24:23 -0400
commit007d573147bb9086c63e779b1db3938690037db8 (patch)
tree8a0833743202d0e6be899fe65b50a47197c0e40a /src/nvim/path.c
parent83c683f5e15867c2e2889442860e91fd1074b4e1 (diff)
parenta64114eba017c0db3d1849186c9c54fb09308761 (diff)
downloadrneovim-007d573147bb9086c63e779b1db3938690037db8.tar.gz
rneovim-007d573147bb9086c63e779b1db3938690037db8.tar.bz2
rneovim-007d573147bb9086c63e779b1db3938690037db8.zip
Merge pull request #4131 from ZyX-I/json-functions
Add JSON support
Diffstat (limited to 'src/nvim/path.c')
-rw-r--r--src/nvim/path.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/nvim/path.c b/src/nvim/path.c
index 22a3f96cfa..aaf54bc5b4 100644
--- a/src/nvim/path.c
+++ b/src/nvim/path.c
@@ -1495,13 +1495,12 @@ void simplify_filename(char_u *filename)
} while (*p != NUL);
}
-static char_u *eval_includeexpr(char_u *ptr, size_t len)
+static char *eval_includeexpr(const char *const ptr, const size_t len)
{
- assert(len <= INT_MAX);
- set_vim_var_string(VV_FNAME, ptr, (int)len);
- char_u *res = eval_to_string_safe(curbuf->b_p_inex, NULL,
- was_set_insecurely((char_u *)"includeexpr",
- OPT_LOCAL));
+ set_vim_var_string(VV_FNAME, ptr, (ptrdiff_t) len);
+ char *res = (char *) eval_to_string_safe(
+ curbuf->b_p_inex, NULL, was_set_insecurely((char_u *)"includeexpr",
+ OPT_LOCAL));
set_vim_var_string(VV_FNAME, NULL, 0);
return res;
}
@@ -1523,7 +1522,7 @@ find_file_name_in_path (
char_u *tofree = NULL;
if ((options & FNAME_INCL) && *curbuf->b_p_inex != NUL) {
- tofree = eval_includeexpr(ptr, len);
+ tofree = (char_u *) eval_includeexpr((char *) ptr, len);
if (tofree != NULL) {
ptr = tofree;
len = STRLEN(ptr);
@@ -1540,7 +1539,7 @@ find_file_name_in_path (
*/
if (file_name == NULL
&& !(options & FNAME_INCL) && *curbuf->b_p_inex != NUL) {
- tofree = eval_includeexpr(ptr, len);
+ tofree = (char_u *) eval_includeexpr((char *) ptr, len);
if (tofree != NULL) {
ptr = tofree;
len = STRLEN(ptr);