com php-src: fix compat with lexer stuff: phpdbg_prompt.c
| From: | Bob Weinand | Date: | Sun, 13 Apr 2014 10:42:47 +0000 |
| Subject: | com php-src: fix compat with lexer stuff: phpdbg_prompt.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-77003@lists.php.net to get a copy of this message | ||
Commit: faa7e3264e4f1d91678baf4ef1287e655f81c61d
Author: krakjoe <joe.watkins@live.co.uk> Sun, 13 Apr 2014 11:42:47 +0100
Parents: 5c69f3dd8b6adde45e90b1c8cb05f98c723d1abb
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=faa7e3264e4f1d91678baf4ef1287e655f81c61d
Log:
fix compat with lexer stuff
Changed paths:
M phpdbg_prompt.c
Diff:
diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c
index 93bc638..bc2e667 100644
--- a/phpdbg_prompt..c
+++ b/phpdbg_prompt.c
@@ -66,7 +66,7 @@ const phpdbg_command_t phpdbg_prompt_commands[] = {
PHPDBG_COMMAND_D(export, "export breaks to a .phpdbginit script", '>',
NULL, "s"),
PHPDBG_COMMAND_D(sh, "shell a command", 0, NULL,
"i"),
PHPDBG_COMMAND_D(quit, "exit phpdbg", 'q',
NULL, 0),
- PHPDBG_COMMAND_D(watch, "set watchpoint", 'w',
phpdbg_watch_commands, "ss"),
+ PHPDBG_COMMAND_D(watch, "set watchpoint", 'w',
phpdbg_watch_commands, "|ss"),
PHPDBG_END_COMMAND
}; /* }}} */
@@ -1002,15 +1002,13 @@ PHPDBG_COMMAND(list) /* {{{ */
PHPDBG_COMMAND(watch) /* {{{ */
{
- switch (param->type) {
+ if (!param || param->type == EMPTY_PARAM) {
+ phpdbg_list_watchpoints(TSRMLS_C);
+ } else switch (param->type) {
case STR_PARAM:
phpdbg_create_var_watchpoint(param->str, param->len TSRMLS_CC);
break;
- case EMPTY_PARAM:
- phpdbg_list_watchpoints(TSRMLS_C);
- break;
-
phpdbg_default_switch_case();
}