From 090efd9ab0036a45c515cc008dbbab72d0ef8fc1 Mon Sep 17 00:00:00 2001 From: Maschell Date: Sat, 6 Jun 2020 22:40:52 +0200 Subject: [PATCH] The WUMS_INITIALIZE now has an argument which provides a pointer to the module_information_t struct --- include/wums/hooks.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/include/wums/hooks.h b/include/wums/hooks.h index 49d903b..0c4818c 100644 --- a/include/wums/hooks.h +++ b/include/wums/hooks.h @@ -26,6 +26,7 @@ #pragma once #include "common.h" +#include "defines/module_defines.h" #ifdef __cplusplus extern "C" { @@ -51,13 +52,16 @@ typedef struct wums_hook_t { const void *target; /* Address of our own, new function */ } wums_hook_t; +typedef struct wums_app_init_args_t { + module_information_t* module_information; +} wums_app_init_args_t; -#define WUMS_INITIALIZE() \ +#define WUMS_INITIALIZE(myargs) \ WUMS_INIT_WUT(); \ WUMS_FINI_WUT(); \ - void __wums__init(void);\ + void __wums__init(wums_app_init_args_t);\ WUMS_HOOK_EX(WUMS_HOOK_INIT, __wums__init); \ - void __wums__init() + void __wums__init(wums_app_init_args_t myargs) #define WUMS_APPLICATION_STARTS() \ void __wums_start(void);\