diff options
Diffstat (limited to 'Zend/zend_compile.h')
-rw-r--r-- | Zend/zend_compile.h | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index 21ea82ae17..b63dd8c90a 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -648,6 +648,10 @@ int zendlex(znode *zendlval TSRMLS_DC); #define ZEND_ARG_COMPILE_TIME_BOUND (1<<1) #define ZEND_ARG_SEND_FUNCTION (1<<2) +#define ZEND_SEND_BY_VAL 0 +#define ZEND_SEND_BY_REF 1 +#define ZEND_SEND_PREFER_REF 2 + /* Lost In Stupid Parentheses */ #define ARG_SHOULD_BE_SENT_BY_REF(zf, arg_num) \ ( \ @@ -657,15 +661,31 @@ int zendlex(znode *zendlval TSRMLS_DC); ( \ ( \ arg_num<=((zend_function *) zf)->common.num_args \ - && ((zend_function *) zf)->common.arg_info[arg_num-1].pass_by_reference \ + && ((zend_function *) zf)->common.arg_info[arg_num-1].pass_by_reference == ZEND_SEND_BY_REF \ ) \ || ( \ arg_num>((zend_function *) zf)->common.num_args \ - && ((zend_function *) zf)->common.pass_rest_by_reference \ + && ((zend_function *) zf)->common.pass_rest_by_reference == ZEND_SEND_BY_REF \ ) \ ) \ ) +#define ARG_MAY_BE_SENT_BY_REF(zf, arg_num) \ + ( \ + zf \ + && ((zend_function *) zf)->common.arg_info \ + && \ + ( \ + ( \ + arg_num<=((zend_function *) zf)->common.num_args \ + && ((zend_function *) zf)->common.arg_info[arg_num-1].pass_by_reference == ZEND_SEND_PREFER_REF \ + ) \ + || ( \ + arg_num>((zend_function *) zf)->common.num_args \ + && ((zend_function *) zf)->common.pass_rest_by_reference == ZEND_SEND_PREFER_REF \ + ) \ + ) \ + ) #define ZEND_RETURN_VAL 0 #define ZEND_RETURN_REF 1 |