summaryrefslogtreecommitdiff
path: root/src/shared.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared.h')
-rw-r--r--src/shared.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/shared.h b/src/shared.h
index 1a629e6..3b0a5f7 100644
--- a/src/shared.h
+++ b/src/shared.h
@@ -76,10 +76,13 @@ int cleanup_fire(cleanup * const loc);
76 76
77/* Cleanup environment creator. Automatically defines the variables `__CLEANUP`, `__CLEANUP_FUNCS`, and `__CLEANUP_ARGS` and initializes 77/* Cleanup environment creator. Automatically defines the variables `__CLEANUP`, `__CLEANUP_FUNCS`, and `__CLEANUP_ARGS` and initializes
78// via `cleanup_init()` using these variables. */ 78// via `cleanup_init()` using these variables. */
79#define cleanup_create(size) \ 79#define cleanup_CREATE(size) \
80cleanup __CLEANUP; \ 80cleanup __CLEANUP; \
81cleanup_callback __CLEANUP_FUNCS[(size)]; \ 81cleanup_callback __CLEANUP_FUNCS[(size)]; \
82void *__CLEANUP_ARGS[(size)]; \ 82void *__CLEANUP_ARGS[(size)]; \
83cleanup_init(&__CLEANUP, (size), __CLEANUP_FUNCS, __CLEANUP_ARGS) 83cleanup_init(&__CLEANUP, (size), __CLEANUP_FUNCS, __CLEANUP_ARGS)
84 84
85#define cleanup_REGISTER(cb, arg) cleanup_register(&__CLEANUP, (cb), (arg))
86#define cleanup_CNDREGISTER(flag, cb, arg) cleanup_cndregister(&__CLEANUP, (flag), (cb), (arg))
87
85#endif \ No newline at end of file 88#endif \ No newline at end of file