diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2023-05-11 11:53:01 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2023-05-11 15:19:25 -0700 |
commit | caa75150ab4982c5ca0e48e606dd4f81087e7a3d (patch) | |
tree | ba6d11660deb82c56384580359711dd1b6d4938f | |
parent | daf765c1351e551266682a48e148812195d97905 (diff) |
til: add setup assert in til_module_create_context()
If the module has a .setup() method, it should be able to just
blindly expect a valid baked setup to come in @ context create.
Let's enforce that here, and let the module code providing setup
hooks just go forth and access the setup assuming it's at least
present and as valid as their setup method produces.
-rw-r--r-- | src/til.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -232,6 +232,7 @@ int til_module_create_context(const til_module_t *module, til_stream_t *stream, assert(module); assert(parent_path); + assert(setup || !module->setup); /* if a module provides a .setup() method, it can assume a provided setup */ assert(res_context); { |