diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2022-03-19 12:18:27 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2022-03-19 12:18:27 -0700 |
commit | 292357d284a6cb067a6cb3c7779225e65edb475e (patch) | |
tree | 7109afb3ab1ab1ce58a5f3fc275d75781b984aa0 /src/til.c | |
parent | 35616ec3926638993caebdf617a7cbae725ef592 (diff) |
til: add til_module_destroy_context() helper
Diffstat (limited to 'src/til.c')
-rw-r--r-- | src/til.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -164,6 +164,19 @@ int til_module_create_context(const til_module_t *module, unsigned ticks, void * } +void * til_module_destroy_context(const til_module_t *module, void *context) +{ + assert(module); + + if (!module->destroy_context) + return NULL; + + module->destroy_context(context); + + return NULL; +} + + /* select module if not yet selected, then setup the module. */ int til_module_setup(til_settings_t *settings, const til_setting_t **res_setting, const til_setting_desc_t **res_desc) { |