feat(module manager): module new add ctx as parameter

This commit is contained in:
yangwei
2024-09-19 15:58:39 +08:00
parent f26ed588da
commit 6af61355e3
3 changed files with 5 additions and 4 deletions

View File

@@ -187,10 +187,11 @@ struct stellar_module *stellar_module_manager_get_module(struct stellar_module_m
*******************************************/
struct stellar_module *stellar_module_new(const char *name)
struct stellar_module *stellar_module_new(const char *name, void *ctx)
{
struct stellar_module *mod = CALLOC(struct stellar_module, 1);
memcpy(mod->name, name, MIN(NAME_MAX, strlen(name)));
mod->module_ctx=ctx;
return mod;
}