diff options
author | Anatol Belski <ab@php.net> | 2018-06-21 11:47:10 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2018-06-21 11:50:48 +0200 |
commit | f87cc89f4d524c63889168b20459c899e809c97f (patch) | |
tree | 9fcb3a37c0d06988c42f1688ff4412c476198c6b /Zend/zend_ast.h | |
parent | 4bd6be8a5fdac7bf3795340e16cf572c0ae7c07f (diff) | |
download | php-git-f87cc89f4d524c63889168b20459c899e809c97f.tar.gz |
Gereralize VA macro expansion mechanism
Avoids code duplication and makes in usable elsewhere.
Diffstat (limited to 'Zend/zend_ast.h')
-rw-r--r-- | Zend/zend_ast.h | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/Zend/zend_ast.h b/Zend/zend_ast.h index c5e4a17474..d9640a70cd 100644 --- a/Zend/zend_ast.h +++ b/Zend/zend_ast.h @@ -204,27 +204,12 @@ ZEND_API zend_ast * ZEND_FASTCALL zend_ast_create_zval_from_long(zend_long lval) ZEND_API zend_ast * ZEND_FASTCALL zend_ast_create_constant(zend_string *name, zend_ast_attr attr); #if ZEND_AST_SPEC -# ifdef ZEND_WIN32 -# define ZEND_AST_EXPAND_VA(a) a -# endif - -# ifdef ZEND_WIN32 -# define ZEND_AST_SPEC_CALL(name, ...) \ - ZEND_AST_EXPAND_VA(ZEND_AST_SPEC_CALL_(name, __VA_ARGS__, _4, _3, _2, _1, _0)(__VA_ARGS__)) -# else -# define ZEND_AST_SPEC_CALL(name, ...) \ - ZEND_AST_SPEC_CALL_(name, __VA_ARGS__, _4, _3, _2, _1, _0)(__VA_ARGS__) -# endif +# define ZEND_AST_SPEC_CALL(name, ...) \ + ZEND_EXPAND_VA(ZEND_AST_SPEC_CALL_(name, __VA_ARGS__, _4, _3, _2, _1, _0)(__VA_ARGS__)) # define ZEND_AST_SPEC_CALL_(name, _, _4, _3, _2, _1, suffix, ...) \ name ## suffix - -# ifdef ZEND_WIN32 -# define ZEND_AST_SPEC_CALL_EX(name, ...) \ - ZEND_AST_EXPAND_VA(ZEND_AST_SPEC_CALL_EX_(name, __VA_ARGS__, _4, _3, _2, _1, _0)(__VA_ARGS__)) -# else -# define ZEND_AST_SPEC_CALL_EX(name, ...) \ - ZEND_AST_SPEC_CALL_EX_(name, __VA_ARGS__, _4, _3, _2, _1, _0)(__VA_ARGS__) -# endif +# define ZEND_AST_SPEC_CALL_EX(name, ...) \ + ZEND_EXPAND_VA(ZEND_AST_SPEC_CALL_EX_(name, __VA_ARGS__, _4, _3, _2, _1, _0)(__VA_ARGS__)) # define ZEND_AST_SPEC_CALL_EX_(name, _, _5, _4, _3, _2, _1, suffix, ...) \ name ## suffix |