Merge pull request #2169 from seker/v1.x_file_event_handlers

file_event_handlers add before_open function
This commit is contained in:
Gabi Melman
2021-11-15 13:36:03 +02:00
committed by GitHub
8 changed files with 29 additions and 17 deletions

View File

@@ -256,11 +256,15 @@ struct source_loc
const char *funcname{nullptr};
};
typedef struct
typedef struct file_event_handlers
{
std::function<void(const filename_t &filename)> before_open;
std::function<void(const filename_t &filename, std::FILE *file_stream)> after_open;
std::function<void(const filename_t &filename, std::FILE *file_stream)> before_close;
std::function<void(const filename_t &filename)> after_close;
file_event_handlers(): before_open(nullptr), after_open(nullptr), before_close(nullptr), after_close(nullptr)
{}
} file_event_handlers_t;
namespace details {