mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-22 03:56:22 +00:00
Introduce our own shutdown callback mechanism.
Instead of adding stuff to `_shutdown()`, we can now register a shutdown routine from the respective `init()` function of our modules. This also has the advantage, that we're sure they're called in reverse order from how the initialization happened. I didn't simply use `atexit()` because POSIX says that the number of possible callbacks is limited (min 32) and I was not sure whether we will maybe extend this number at one point. Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
This commit is contained in:
@@ -196,5 +196,6 @@ gchar* get_expanded_path(const char* path);
|
||||
char* basename_from_url(const char* url);
|
||||
|
||||
gchar* prof_get_version(void);
|
||||
void prof_add_shutdown_routine(void (*routine)(void));
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user