diff options
author | ii14 <59243201+ii14@users.noreply.github.com> | 2023-04-06 22:39:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-06 22:39:50 +0200 |
commit | 7190dba017e3aac0409c73ff1c954d18858cb3c9 (patch) | |
tree | 321f4b2dd65e4a06047beee876d3c2e0d2dbf7d0 /src/nvim/file_search.c | |
parent | 0bc323850410df4c3c1dd8fabded9d2000189270 (diff) | |
download | rneovim-7190dba017e3aac0409c73ff1c954d18858cb3c9.tar.gz rneovim-7190dba017e3aac0409c73ff1c954d18858cb3c9.tar.bz2 rneovim-7190dba017e3aac0409c73ff1c954d18858cb3c9.zip |
refactor: remove use of reserved c++ keywords
libnvim couldn't be easily used in C++ due to the use of reserved keywords.
Additionally, add explicit casts to *alloc function calls used in inline
functions, as C++ doesn't allow implicit casts from void pointers.
Diffstat (limited to 'src/nvim/file_search.c')
-rw-r--r-- | src/nvim/file_search.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/nvim/file_search.c b/src/nvim/file_search.c index d341cb20c4..2e9442e704 100644 --- a/src/nvim/file_search.c +++ b/src/nvim/file_search.c @@ -1117,28 +1117,28 @@ static int ff_check_visited(ff_visited_T **visited_list, char *fname, char *wc_p static ff_stack_T *ff_create_stack_element(char *fix_part, char *wc_part, int level, int star_star_empty) { - ff_stack_T *new = xmalloc(sizeof(ff_stack_T)); + ff_stack_T *stack = xmalloc(sizeof(ff_stack_T)); - new->ffs_prev = NULL; - new->ffs_filearray = NULL; - new->ffs_filearray_size = 0; - new->ffs_filearray_cur = 0; - new->ffs_stage = 0; - new->ffs_level = level; - new->ffs_star_star_empty = star_star_empty; + stack->ffs_prev = NULL; + stack->ffs_filearray = NULL; + stack->ffs_filearray_size = 0; + stack->ffs_filearray_cur = 0; + stack->ffs_stage = 0; + stack->ffs_level = level; + stack->ffs_star_star_empty = star_star_empty; // the following saves NULL pointer checks in vim_findfile if (fix_part == NULL) { fix_part = ""; } - new->ffs_fix_path = xstrdup(fix_part); + stack->ffs_fix_path = xstrdup(fix_part); if (wc_part == NULL) { wc_part = ""; } - new->ffs_wc_path = xstrdup(wc_part); + stack->ffs_wc_path = xstrdup(wc_part); - return new; + return stack; } /// Push a dir on the directory stack. |