library: Change init/deinit order to allow utils to depend on threading
This commit is contained in:
parent
c46cee6f6d
commit
965e846cc3
|
@ -141,12 +141,13 @@ void library_deinit()
|
|||
{
|
||||
lib->leak_detective->report(lib->leak_detective, detailed);
|
||||
lib->leak_detective->destroy(lib->leak_detective);
|
||||
lib->leak_detective = NULL;
|
||||
}
|
||||
|
||||
arrays_deinit();
|
||||
threads_deinit();
|
||||
backtrace_deinit();
|
||||
arrays_deinit();
|
||||
utils_deinit();
|
||||
threads_deinit();
|
||||
|
||||
free((void*)this->public.ns);
|
||||
free(this);
|
||||
|
@ -269,10 +270,10 @@ bool library_init(char *settings, const char *namespace)
|
|||
);
|
||||
lib = &this->public;
|
||||
|
||||
utils_init();
|
||||
backtrace_init();
|
||||
threads_init();
|
||||
utils_init();
|
||||
arrays_init();
|
||||
backtrace_init();
|
||||
|
||||
#ifdef LEAK_DETECTIVE
|
||||
lib->leak_detective = leak_detective_create();
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include "test_runner.h"
|
||||
|
||||
#include <library.h>
|
||||
#include <threading/thread.h>
|
||||
#include <plugins/plugin_feature.h>
|
||||
#include <collections/array.h>
|
||||
#include <utils/test.h>
|
||||
|
@ -372,6 +373,7 @@ static void print_failures(array_t *failures)
|
|||
{
|
||||
failure_t failure;
|
||||
|
||||
threads_init();
|
||||
backtrace_init();
|
||||
|
||||
while (array_remove(failures, 0, &failure))
|
||||
|
@ -391,6 +393,7 @@ static void print_failures(array_t *failures)
|
|||
}
|
||||
|
||||
backtrace_deinit();
|
||||
threads_deinit();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue