com php-src: - Added variadic support to prototype dumping: phpdbg_frame.c
| From: | Bob Weinand | Date: | Sun, 08 Dec 2013 20:04:39 +0000 |
| Subject: | com php-src: - Added variadic support to prototype dumping: phpdbg_frame.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-75268@lists.php.net to get a copy of this message | ||
Commit: cd3b070d7eb98119878bfe496d6d2c4748ed550b
Author: Felipe Pena <felipensp@gmail.com> Sun, 8 Dec 2013 18:04:39 -0200
Parents: b655a0bc7ef93b1bfc178033b334d1d3c23b6379
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=cd3b070d7eb98119878bfe496d6d2c4748ed550b
Log:
- Added variadic support to prototype dumping
Changed paths:
M phpdbg_frame.c
Diff:
diff --git a/phpdbg_frame.c b/phpdbg_frame.c
index 88e2824..5414242 100644
--- a/phpdbg_frame.c
+++ b/phpdbg_frame.c
@@ -134,22 +134,29 @@ static void phpdbg_dump_prototype(zval **tmp TSRMLS_DC) /* {{{ */
Z_STRVAL_PP(funcname), is_class == FAILURE ? NULL : Z_STRVAL_PP(class) TSRMLS_CC);
const zend_arg_info *arginfo = func ? func->common.arg_info : NULL;
int j = 0, m = func ? func->common.num_args : 0;
+ zend_bool is_variadic = 0;
zend_hash_internal_pointer_reset_ex(Z_ARRVAL_PP(args), &iterator);
while (zend_hash_get_current_data_ex(Z_ARRVAL_PP(args),
(void **) &argstmp, &iterator) == SUCCESS) {
-
if (j) {
phpdbg_write(", ");
}
if (m && j < m) {
- phpdbg_write("%s=", arginfo[j].name);
+#if PHP_VERSION_ID >= 50600
+ is_variadic = arginfo[j].is_variadic;
+#endif
+ phpdbg_write("%s=%s",
+ arginfo[j].name, is_variadic ? "[": "");
}
++j;
zend_print_flat_zval_r(*argstmp TSRMLS_CC);
zend_hash_move_forward_ex(Z_ARRVAL_PP(args), &iterator);
}
+ if (is_variadic) {
+ phpdbg_write("]");
+ }
}
phpdbg_write(")");
}