-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathcommon.c
More file actions
37 lines (32 loc) · 1.24 KB
/
common.c
File metadata and controls
37 lines (32 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include "../crt.h"
#include "config.h"
Config config;
void cleanup_config() {
#define FREE_NON_NULL(val) \
if (val != NULL) { \
free(val); \
val = NULL; \
}
FREE_NON_NULL(config.target_assembly);
FREE_NON_NULL(config.target_native_library);
FREE_NON_NULL(config.boot_config_override);
FREE_NON_NULL(config.mono_dll_search_path_override);
FREE_NON_NULL(config.clr_corlib_dir);
FREE_NON_NULL(config.clr_runtime_coreclr_path);
FREE_NON_NULL(config.mono_debug_address);
#undef FREE_NON_NULL
}
void init_config_defaults() {
config.enabled = FALSE;
config.ignore_disabled_env = FALSE;
config.redirect_output_log = FALSE;
config.mono_debug_enabled = FALSE;
config.mono_debug_suspend = FALSE;
config.mono_debug_address = NULL;
config.target_assembly = NULL;
config.target_native_library = NULL;
config.boot_config_override = NULL;
config.mono_dll_search_path_override = NULL;
config.clr_corlib_dir = NULL;
config.clr_runtime_coreclr_path = NULL;
}