summaryrefslogtreecommitdiff
path: root/src/til_setup.c
AgeCommit message (Collapse)Author
2022-04-24til_setup: introduce til_setup_free()Vito Caputo
simple wrapper around til_setup_t.free()
2022-04-24til_setup: add til_setup_new() helperVito Caputo
For use when setup functions allocate their private setup to return in *res_setup. They specify the size of their private setup, and supply the free function to use. This may be libc's free() when it's a simple setup struct, or a bespoke free function when deep/complex freeing is required for cleanup. It's expected that callers will be embedding til_setup_t at the start of their private setup struct, and returning a pointer to this in *res_setup which would be the same value as a pointer to to their private setup struct.
© All Rights Reserved