mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
MFH: Added new macro for check void parameters.
(deprecating ZEND_WRONG_PARAM_COUNT for this cases)
This commit is contained in:
parent
725b31fc6c
commit
cc2b17d51d
@ -189,7 +189,8 @@ ZEND_API int zend_copy_parameters_array(int param_count, zval *argument_array TS
|
||||
_zend_get_parameters_array(ht, param_count, argument_array TSRMLS_CC)
|
||||
#define zend_get_parameters_array_ex(param_count, argument_array) \
|
||||
_zend_get_parameters_array_ex(param_count, argument_array TSRMLS_CC)
|
||||
|
||||
#define zend_parse_parameters_none() \
|
||||
zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "")
|
||||
|
||||
/* Parameter parsing API -- andrei */
|
||||
|
||||
|
@ -1182,8 +1182,8 @@ ZEND_FUNCTION(crash)
|
||||
ZEND_FUNCTION(get_included_files)
|
||||
{
|
||||
char *entry;
|
||||
if (ZEND_NUM_ARGS() != 0) {
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
array_init(return_value);
|
||||
@ -1394,8 +1394,8 @@ ZEND_FUNCTION(get_declared_classes)
|
||||
zend_uint mask = ZEND_ACC_INTERFACE;
|
||||
zend_uint comply = 0;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 0) {
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
array_init(return_value);
|
||||
@ -1410,8 +1410,8 @@ ZEND_FUNCTION(get_declared_interfaces)
|
||||
zend_uint mask = ZEND_ACC_INTERFACE;
|
||||
zend_uint comply = 1;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 0) {
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
array_init(return_value);
|
||||
@ -1446,8 +1446,8 @@ ZEND_FUNCTION(get_defined_functions)
|
||||
zval *internal;
|
||||
zval *user;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 0) {
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
MAKE_STD_ZVAL(internal);
|
||||
@ -1763,8 +1763,8 @@ ZEND_FUNCTION(debug_print_backtrace)
|
||||
zval *arg_array = NULL;
|
||||
int indent = 0;
|
||||
|
||||
if (ZEND_NUM_ARGS()) {
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
ptr = EG(current_execute_data);
|
||||
|
@ -182,8 +182,8 @@ ZEND_METHOD(error_exception, __construct)
|
||||
/* }}} */
|
||||
|
||||
#define DEFAULT_0_PARAMS \
|
||||
if (ZEND_NUM_ARGS() > 0) { \
|
||||
ZEND_WRONG_PARAM_COUNT(); \
|
||||
if (zend_parse_parameters_none() == FAILURE) { \
|
||||
return; \
|
||||
}
|
||||
|
||||
static void _default_exception_get_entry(zval *object, char *name, int name_len, zval *return_value TSRMLS_DC) /* {{{ */
|
||||
|
Loading…
Reference in New Issue
Block a user