Merge branch 'dev' into dev-win

This commit is contained in:
daan 2019-08-20 07:50:03 -07:00
commit a5071eb510
3 changed files with 16 additions and 5 deletions

View File

@ -237,8 +237,10 @@ typedef enum mi_option_e {
mi_decl_export bool mi_option_is_enabled(mi_option_t option);
mi_decl_export void mi_option_enable(mi_option_t option, bool enable);
mi_decl_export void mi_option_enable_default(mi_option_t option, bool enable);
mi_decl_export void mi_option_enable(mi_option_t option);
mi_decl_export void mi_option_disable(mi_option_t option);
mi_decl_export void mi_option_set_enabled(mi_option_t option, bool enable);
mi_decl_export void mi_option_set_enabled_default(mi_option_t option, bool enable);
mi_decl_export long mi_option_get(mi_option_t option);
mi_decl_export void mi_option_set(mi_option_t option, long value);

View File

@ -103,14 +103,23 @@ bool mi_option_is_enabled(mi_option_t option) {
return (mi_option_get(option) != 0);
}
void mi_option_enable(mi_option_t option, bool enable) {
void mi_option_set_enabled(mi_option_t option, bool enable) {
mi_option_set(option, (enable ? 1 : 0));
}
void mi_option_enable_default(mi_option_t option, bool enable) {
void mi_option_set_enabled_default(mi_option_t option, bool enable) {
mi_option_set_default(option, (enable ? 1 : 0));
}
void mi_option_enable(mi_option_t option) {
mi_option_set_enabled(option,true);
}
void mi_option_disable(mi_option_t option) {
mi_option_set_enabled(option,false);
}
// --------------------------------------------------------
// Messages
// --------------------------------------------------------

View File

@ -66,7 +66,7 @@ bool test_heap2();
// Main testing
// ---------------------------------------------------------------------------
int main() {
mi_option_enable(mi_option_verbose,false);
mi_option_disable(mi_option_verbose);
// ---------------------------------------------------
// Malloc