diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2023-05-30 14:52:14 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2023-05-30 14:52:14 -0700 |
commit | 249112803107d6341b5eb67caf5b730d3cc14d4f (patch) | |
tree | 326f4b06b533e91819a2ef6befcde08c0122993a /src/til_module_context.h | |
parent | db3f0619cca328f77fd935a5a9e581ba9b1d9ff9 (diff) |
til,*: pivot to til_setup_t for context paths
This changes til_setup_t* from optional to required for
til_module_context_t creation, while dropping the separate path
parameter construction and passing throughout.
Diffstat (limited to 'src/til_module_context.h')
-rw-r--r-- | src/til_module_context.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/til_module_context.h b/src/til_module_context.h index 7a5fca5..cbbfb8e 100644 --- a/src/til_module_context.h +++ b/src/til_module_context.h @@ -1,8 +1,6 @@ #ifndef _TIL_MODULE_CONTEXT_H #define _TIL_MODULE_CONTEXT_H -#include <stdint.h> - typedef struct til_module_context_t til_module_context_t; typedef struct til_module_t til_module_t; typedef struct til_setup_t til_setup_t; @@ -14,12 +12,12 @@ struct til_module_context_t { unsigned seed; unsigned ticks; unsigned n_cpus; - char *path; /* for locating this instance of the module, NOT a file path */ - uint32_t path_hash; - til_setup_t *setup; /* optional baked setup this context was made from (reffed by context when present) */ + til_setup_t *setup; /* Baked setup this context was made from, reffed by context. + * Always present as it provides the path, which is generally derived from a settings instance. + */ }; -void * til_module_context_new(const til_module_t *module, size_t size, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, char *path, til_setup_t *setup); +void * til_module_context_new(const til_module_t *module, size_t size, til_stream_t *stream, unsigned seed, unsigned ticks, unsigned n_cpus, til_setup_t *setup); void * til_module_context_free(til_module_context_t *module_context); #endif |