[vlc-commits] override: simplify CALL()
Rémi Denis-Courmont
git at videolan.org
Wed Feb 16 22:25:30 CET 2011
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Feb 16 23:24:59 2011 +0200| [d9fc3851eab1c2b729665d032c42572c10f6443d] | committer: Rémi Denis-Courmont
override: simplify CALL()
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d9fc3851eab1c2b729665d032c42572c10f6443d
---
bin/override.c | 24 ++----------------------
1 files changed, 2 insertions(+), 22 deletions(-)
diff --git a/bin/override.c b/bin/override.c
index 2c94afe..705bb83 100644
--- a/bin/override.c
+++ b/bin/override.c
@@ -109,32 +109,12 @@ static void *getsym (const char *name)
logbug(&counter, level, __func__, __VA_ARGS__); \
} while (0)
-#ifdef __clang__
-
-#define CALL(func, ...) \
-({ typeof (func) *sym = getsym ( # func); sym (__VA_ARGS__); })
-
-#else
-
/* Evil non-standard GNU C macro ;)
* typeof keyword,
- * statement-expression,
- * nested function...
+ * statement-expression
*/
#define CALL(func, ...) \
-({ \
- static typeof (func) *sym = NULL; \
- static pthread_once_t once = PTHREAD_ONCE_INIT; \
- auto void getsym_once (void); \
- void getsym_once (void) \
- { \
- sym = getsym ( # func); \
- } \
- pthread_once (&once, getsym_once); \
- sym (__VA_ARGS__); \
-})
-
-#endif
+({ typeof (func) *sym = getsym ( # func); sym (__VA_ARGS__); })
/*** Environment ***
*
More information about the vlc-commits
mailing list