diff options
author | Andrea Faulds <ajf@ajf.me> | 2015-02-01 16:40:57 +0000 |
---|---|---|
committer | Andrea Faulds <ajf@ajf.me> | 2015-02-10 15:48:09 +0000 |
commit | 44ed070a9afed6f45165769f959c1122e765ad35 (patch) | |
tree | 792db75fbfc7da013537341917ebd75257ecc706 /Zend/zend_API.h | |
parent | 6b6b2b4b7cc2f463c7add85fd1ccd1ba89b004cf (diff) | |
download | php-git-44ed070a9afed6f45165769f959c1122e765ad35.tar.gz |
Fix Gd usages of ZEND_WRONG_PARAM_COUNT, add usage note
Diffstat (limited to 'Zend/zend_API.h')
-rw-r--r-- | Zend/zend_API.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Zend/zend_API.h b/Zend/zend_API.h index 0855f811dc..4f12834bcf 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -353,12 +353,15 @@ ZEND_API char *zend_get_type_by_const(int type); #define getThis() (Z_OBJ(EX(This)) ? &EX(This) : NULL) #define ZEND_IS_METHOD_CALL() (EX(func)->common.scope != NULL) -#define WRONG_PARAM_COUNT ZEND_WRONG_PARAM_COUNT((ZEND_CALL_INFO(EG(current_execute_data)) & ZEND_CALL_STRICT_TYPEHINTS) ? 1 : 0) -#define WRONG_PARAM_COUNT_WITH_RETVAL(ret) ZEND_WRONG_PARAM_COUNT_WITH_RETVAL((ZEND_CALL_INFO(EG(current_execute_data)) & ZEND_CALL_STRICT_TYPEHINTS) ? 1 : 0, ret) +#define WRONG_PARAM_COUNT _ZEND_WRONG_PARAM_COUNT((ZEND_CALL_INFO(EG(current_execute_data)) & ZEND_CALL_STRICT_TYPEHINTS) ? 1 : 0) +#define WRONG_PARAM_COUNT_WITH_RETVAL(ret) _ZEND_WRONG_PARAM_COUNT_WITH_RETVAL((ZEND_CALL_INFO(EG(current_execute_data)) & ZEND_CALL_STRICT_TYPEHINTS) ? 1 : 0, ret) #define ARG_COUNT(dummy) EX_NUM_ARGS() #define ZEND_NUM_ARGS() EX_NUM_ARGS() -#define ZEND_WRONG_PARAM_COUNT(strict) { _zend_wrong_param_count(strict); return; } -#define ZEND_WRONG_PARAM_COUNT_WITH_RETVAL(strict, ret) { _zend_wrong_param_count(strict); return ret; } +/* These are prefixed with underscores for a reason: don't use them directly + * Use WRONG_PARAM_COUNT; + */ +#define _ZEND_WRONG_PARAM_COUNT(strict) { _zend_wrong_param_count(strict); return; } +#define _ZEND_WRONG_PARAM_COUNT_WITH_RETVAL(strict, ret) { _zend_wrong_param_count(strict); return ret; } #ifndef ZEND_WIN32 #define DLEXPORT |