diff options
| author | Mikhail Osipov <m.osipov@corp.mail.ru> | 2020-09-18 02:27:22 +0300 |
|---|---|---|
| committer | Mikhail Osipov <m.osipov@corp.mail.ru> | 2020-09-18 02:27:22 +0300 |
| commit | d608df082026483dbfe93830f164f70d8e3c98cc (patch) | |
| tree | 950b4e14a2a813cf89b8cafd83d2857d75cebeea | |
| parent | d4e26c1d59f7e69bd71c92b93c033e197a38a782 (diff) | |
| -rw-r--r-- | defer.h | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -1,6 +1,11 @@ #ifndef __DEFER_H__ #define __DEFER_H__ +/* + highlight with vim: + echo syn keyword cStatement defer >> ~/.vim/after/syntax/c.vim +*/ + #ifndef __unused #define __unused __attribute__((unused)) #endif @@ -13,8 +18,8 @@ #define UNIQ(name) CAT(name, __LINE__) #define defer \ - auto void UNIQ(defer_func)(int *); \ - int UNIQ(defer_var) __cleanup(UNIQ(defer_func)); \ - void UNIQ(defer_func)(int *__arg __unused) + auto void UNIQ(defer_func)(int *); \ + int UNIQ(defer_var) __cleanup(UNIQ(defer_func));\ + void UNIQ(defer_func)(int *__arg __unused) #endif |
