| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #ifndef UTIL_CONTAINER_H | ||
| 2 | #define UTIL_CONTAINER_H | ||
| 3 | |||
| 4 | #include "macros.h" | ||
| 5 | |||
| 6 | typedef void (*FreeFunction)(void *ptr); | ||
| 7 | #define FREE_FUNC(f) (FreeFunction)f | ||
| 8 | |||
| 9 | // Call a FreeFunction declared with an arbitrary pointer parameter | ||
| 10 | // type, without -fsanitize=function pedantry | ||
| 11 | NO_SANITIZE("undefined") | ||
| 12 | 51825 | static inline void do_free_value(FreeFunction freefunc, void *ptr) | |
| 13 | { | ||
| 14 | 51825 | freefunc(ptr); | |
| 15 | 51825 | } | |
| 16 | |||
| 17 | #endif | ||
| 18 |