refactor(stk.h, module.c, stk.c): switch deps to exported array and clean up types

- Move stk_dep_t to public header
- Rename stk_set_module_dependencies_fn to stk_set_module_deps_sym
- Change default deps symbol name from stk_mod_dependencies to stk_mod_deps
- Read deps as direct exported stk_dep_t array instead of function call
- Update sentinel check to .id[0] != '\0'
- Default module version to 0.0.0 if not provided or invalid
- Remove deps_func from union in stk_module_load
This commit is contained in:
2026-03-03 22:53:37 +01:00
parent ceb389de0d
commit 9a4b5ee9ef
3 changed files with 27 additions and 26 deletions
-5
View File
@@ -8,11 +8,6 @@
typedef int (*stk_init_mod_func)(void);
typedef void (*stk_shutdown_mod_func)(void);
typedef struct {
char id[STK_MOD_ID_BUFFER];
char version[STK_MOD_VERSION_BUFFER];
} stk_dep_t;
typedef struct {
void *handle;
stk_init_mod_func init;