instead of storing modules as a struct, switch to a more "ECS" style of handling modules
This commit is contained in:
+9
-6
@@ -1,6 +1,9 @@
|
|||||||
struct module {
|
#include <stdlib.h>
|
||||||
const char *id;
|
|
||||||
void *handle;
|
static void **stk_handles = NULL;
|
||||||
int (*init)(void);
|
static void (**stk_inits)(void) = NULL;
|
||||||
int (*shutdown)(void);
|
static void (**stk_shutdowns)(void) = NULL;
|
||||||
};
|
static const char **stk_ids = NULL;
|
||||||
|
|
||||||
|
static size_t stk_module_count = 0;
|
||||||
|
static size_t stk_module_capacity = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user