diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2023-09-02 22:44:42 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2023-09-02 22:44:42 -0700 |
commit | 3b0c9a6b3ebedc6d464262de4962a235b66b9c9b (patch) | |
tree | 3f841377290478816d1299024c22557c18d1bd12 /src/modules/submit/Makefile.am | |
parent | 569f87aa166eb8a62190acb24ff8f34515b16c7d (diff) |
til: verify module and setup creator match
til_module_create_contexts() currently supplies the til_module_t*
independent from the til_setup_t*, but since the addition of
til_setup_t.creator, we actually get the module from the setup as
well. So let's at least assert that they match, since it'd be a
real problem if a setup from a foreign creator somehow got here.
It's tempting to refactor to just derive the module from the
setup altogether and stop passing that around separately, but
that kind of sucks as-is because til_setup_t is used by more than
just rendering modules. It makes me lean towards deprecating
til_setup_t.creator and instead having the various til_setup_t
users subclass it with their own types like til_fb_setup_t and
til_module_setup_t which each get typed creators, then pass those
around. It's starting to smell like over-engineering, let's just
roll with the assert.
Diffstat (limited to 'src/modules/submit/Makefile.am')
0 files changed, 0 insertions, 0 deletions