diff src/proto/findfile.pro @ 32138:2c09e40ce3da v9.0.1400

patch 9.0.1400: find_file_in_path() is not reentrant Commit: https://github.com/vim/vim/commit/5145c9a829cd43cb9e7962b181bf99226eb3a53f Author: Bram Moolenaar <Bram@vim.org> Date: Sat Mar 11 13:55:53 2023 +0000 patch 9.0.1400: find_file_in_path() is not reentrant Problem: find_file_in_path() is not reentrant. Solution: Instead of global variables pass pointers to the functions. (closes #12093)
author Bram Moolenaar <Bram@vim.org>
date Sat, 11 Mar 2023 15:00:04 +0100
parents 46f95606b9ec
children a0f822031bfc
line wrap: on
line diff
--- a/src/proto/findfile.pro
+++ b/src/proto/findfile.pro
@@ -3,10 +3,10 @@ void *vim_findfile_init(char_u *path, ch
 char_u *vim_findfile_stopdir(char_u *buf);
 void vim_findfile_cleanup(void *ctx);
 char_u *vim_findfile(void *search_ctx_arg);
-char_u *find_file_in_path(char_u *ptr, int len, int options, int first, char_u *rel_fname);
+char_u *find_file_in_path(char_u *ptr, int len, int options, int first, char_u *rel_fname, char_u **file_to_find, char **search_ctx);
 void free_findfile(void);
-char_u *find_directory_in_path(char_u *ptr, int len, int options, char_u *rel_fname);
-char_u *find_file_in_path_option(char_u *ptr, int len, int options, int first, char_u *path_option, int find_what, char_u *rel_fname, char_u *suffixes);
+char_u *find_directory_in_path(char_u *ptr, int len, int options, char_u *rel_fname, char_u **file_to_find, char **search_ctx);
+char_u *find_file_in_path_option(char_u *ptr, int len, int options, int first, char_u *path_option, int find_what, char_u *rel_fname, char_u *suffixes, char_u **file_to_find, char **search_ctx_arg);
 char_u *grab_file_name(long count, linenr_T *file_lnum);
 char_u *file_name_at_cursor(int options, long count, linenr_T *file_lnum);
 char_u *file_name_in_line(char_u *line, int col, int options, long count, char_u *rel_fname, linenr_T *file_lnum);