static-destruct: Reduce transitive includes

This commit is contained in:
Daan De Meyer
2025-05-07 22:04:46 +09:00
committed by Yu Watanabe
parent e53d4f343d
commit decad4826d
37 changed files with 38 additions and 1 deletions
+2 -1
View File
@@ -2,10 +2,11 @@
#pragma once
#include "alloc-util.h"
#include "macro.h"
#include "memory-util.h"
typedef void (*free_func_t)(void *p);
/* A framework for registering static variables that shall be freed on shutdown of a process. It's a bit like gcc's
* destructor attribute, but allows us to precisely schedule when we want to free the variables. This is supposed to
* feel a bit like the gcc cleanup attribute, but for static variables. Note that this does not work for static