instead of storing modules as a struct, switch to a more "ECS" style of handling modules

This commit is contained in:
anth64 committed 2025-10-09 07:55:41 +02:00
1 parent dfa190caea
commit 4b6c3ffe2f
1 file changed
+9 -6
+9 -6
View File
@@ -1,6 +1,9 @@
struct module {
const char *id;
void *handle;
int (*init)(void);
int (*shutdown)(void);
};
#include <stdlib.h>
static void **stk_handles = NULL;
static void (**stk_inits)(void) = NULL;
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;