Use new parameter parsing API

This commit is contained in:
Dmitry Stogov 2008-07-01 10:01:25 +00:00
parent a96cf2b175
commit d8aad16dd0

View File

@ -669,16 +669,13 @@ static char * php_formatted_print(int ht, int *len, int use_array, int format_of
char *format, *result, padding;
int always_sign;
argc = ZEND_NUM_ARGS();
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "+", &args, &argc) == FAILURE) {
return NULL;
}
/* verify the number of args */
if ((use_array && argc != (2 + format_offset))
|| (!use_array && argc < (1 + format_offset))) {
WRONG_PARAM_COUNT_WITH_RETVAL(NULL);
}
args = (zval ***)safe_emalloc(argc, sizeof(zval *), 0);
if (zend_get_parameters_array_ex(argc, args) == FAILURE) {
efree(args);
WRONG_PARAM_COUNT_WITH_RETVAL(NULL);
}