odyssey/sources/extention.h

31 lines
587 B
C
Raw Normal View History

2021-04-21 13:11:18 +00:00
#ifndef ODYSSEY_ADDON_H
#define ODYSSEY_ADDON_H
typedef struct od_extention od_extention_t;
struct od_extention {
od_module_t *modules;
od_global_t *glob;
};
static inline od_retcode_t od_extentions_init(od_extention_t *extentions)
{
extentions->modules = malloc(sizeof(od_module_t));
od_modules_init(extentions->modules);
return OK_RESPONSE;
}
static inline od_retcode_t od_extention_free(od_logger_t *l,
od_extention_t *extentions)
{
if (extentions->modules) {
od_modules_unload(l, extentions->modules);
}
return OK_RESPONSE;
}
#endif /* ODYSSEY_ADDON_H */