Indent
This commit is contained in:
parent
e561dc6bb1
commit
833cf5d2c8
15
common.h
15
common.h
@ -34,13 +34,16 @@
|
||||
#define _STRMERGE(a, b) a##b
|
||||
|
||||
#ifdef __clang__
|
||||
static void __attribute__((unused)) _clang_cleanup_func(void (^*dfunc)(void)) { (*dfunc)(); }
|
||||
#define defer(a) void (^_STRMERGE(__df_, __COUNTER__))(void) __attribute__((cleanup(_clang_cleanup_func))) __attribute__((unused)) = ^{ a; }
|
||||
#else
|
||||
#define __block
|
||||
#define defer(a) void _STRMERGE(_cleanup_func_, __LINE__)(void *_STRMERGE(_cleanup_unused_, __LINE__) __attribute__((unused))) { a; } ; int _STRMERGE(_cleanup_var_, __LINE__) __attribute__((cleanup(_STRMERGE(_cleanup_func_, __LINE__)))) __attribute__((unused))
|
||||
#endif
|
||||
static void __attribute__ ((unused)) _clang_cleanup_func(void (^*dfunc) (void))
|
||||
{
|
||||
(*dfunc) ();
|
||||
}
|
||||
|
||||
#define defer(a) void (^_STRMERGE(__df_, __COUNTER__))(void) __attribute__((cleanup(_clang_cleanup_func))) __attribute__((unused)) = ^{ a; }
|
||||
#else
|
||||
#define __block
|
||||
#define defer(a) void _STRMERGE(_cleanup_func_, __LINE__)(void *_STRMERGE(_cleanup_unused_, __LINE__) __attribute__((unused))) { a; } ; int _STRMERGE(_cleanup_var_, __LINE__) __attribute__((cleanup(_STRMERGE(_cleanup_func_, __LINE__)))) __attribute__((unused))
|
||||
#endif
|
||||
|
||||
struct pids_t {
|
||||
pid_t pid;
|
||||
|
Loading…
Reference in New Issue
Block a user