com php-src: removed a loop: phpdbg_prompt.c

From: Date: Tue, 19 Nov 2013 13:22:46 +0000
Subject: com php-src: removed a loop: phpdbg_prompt.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-74800@lists.php.net to get a copy of this message
Commit: b2a19a42d18eb458bdfdc66c7e3af9ee31386186 Author: krakjoe <joe.watkins@live.co.uk> Tue, 19 Nov 2013 13:22:46 +0000 Parents: cf4b451d39f936689fdf51cac6d8847147a1edd5 Branches: PHP-5.6 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b2a19a42d18eb458bdfdc66c7e3af9ee31386186 Log: removed a loop Changed paths: M phpdbg_prompt.c Diff: diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c index 92e39ec..4095f3c 100644 --- a/phpdbg_prompt.c +++ b/phpdbg_prompt.c @@ -970,25 +970,33 @@ int phpdbg_interactive(TSRMLS_D) /* {{{ */ phpdbg_input_t* input = phpdbg_read_input(TSRMLS_C); if (input) { - switch (ret = phpdbg_do_cmd(phpdbg_prompt_commands, input->string, input->length TSRMLS_CC)) { - case FAILURE: - if (!(PHPDBG_G(flags) & PHPDBG_IS_QUITTING)) { - if (phpdbg_call_register(input TSRMLS_CC) == FAILURE) { - phpdbg_error("Failed to execute %s!", input->string); + do { + switch (ret = phpdbg_do_cmd(phpdbg_prompt_commands, input->string, input->length TSRMLS_CC)) { + case FAILURE: + if (!(PHPDBG_G(flags) & PHPDBG_IS_QUITTING)) { + if (phpdbg_call_register(input TSRMLS_CC) == FAILURE) { + phpdbg_error("Failed to execute %s!", input->string); + } } - } - break; + break; - case PHPDBG_LEAVE: - case PHPDBG_FINISH: - case PHPDBG_UNTIL: - case PHPDBG_NEXT: { - if (!EG(in_execution)) { - phpdbg_error("Not running"); + case PHPDBG_LEAVE: + case PHPDBG_FINISH: + case PHPDBG_UNTIL: + case PHPDBG_NEXT: { + if (!EG(in_execution)) { + phpdbg_error("Not running"); + } + goto out; } - goto out; } - } + + if (input->string) { + efree(input->string); + } + efree(input); + + } while ((input = phpdbg_read_input(TSRMLS_C))); } else { if (PHPDBG_G(lcmd)) { ret = PHPDBG_G(lcmd)->handler(

« previous php.cvs (#74800) next »