Merge branch 'feature/tests-leaks' of github.com:ennorehling/eressea into feature/tests-leaks

This commit is contained in:
Enno Rehling 2015-10-13 21:26:56 +02:00
commit 9f6fa5b948
3 changed files with 7 additions and 0 deletions

View file

@ -13,6 +13,7 @@
#endif #endif
#include <triggers/triggers.h> #include <triggers/triggers.h>
#include <util/language.h> #include <util/language.h>
#include <util/functions.h>
#include <kernel/xmlreader.h> #include <kernel/xmlreader.h>
#include <kernel/item.h> #include <kernel/item.h>
#include <kernel/building.h> #include <kernel/building.h>
@ -46,6 +47,7 @@ void game_done(void)
#endif #endif
calendar_cleanup(); calendar_cleanup();
#endif #endif
free_functions();
kernel_done(); kernel_done();
} }

View file

@ -48,3 +48,7 @@ void register_function(pf_generic fun, const char *name)
len = cb_new_kv(name, len, &fun, sizeof(fun), buffer); len = cb_new_kv(name, len, &fun, sizeof(fun), buffer);
cb_insert(&cb_functions, buffer, len); cb_insert(&cb_functions, buffer, len);
} }
void free_functions(void) {
cb_clear(&cb_functions);
}

View file

@ -26,6 +26,7 @@ extern "C" {
pf_generic get_function(const char *name); pf_generic get_function(const char *name);
void register_function(pf_generic fun, const char *name); void register_function(pf_generic fun, const char *name);
void free_functions(void);
#ifdef __cplusplus #ifdef __cplusplus
} }