diff options
author | krakjoe <joe.watkins@live.co.uk> | 2014-01-17 21:08:35 +0000 |
---|---|---|
committer | krakjoe <joe.watkins@live.co.uk> | 2014-01-17 21:08:35 +0000 |
commit | 54fa2883f0be3f4ac3e9faab77434e1833bbae5c (patch) | |
tree | 37504820c537243f6ba66bac88fb8e9e8175b82c /phpdbg_prompt.c | |
parent | 837bd24dea5c32dc186a1fe484c2c276e97e92e1 (diff) | |
download | php-git-54fa2883f0be3f4ac3e9faab77434e1833bbae5c.tar.gz |
remove goto from zend_try/zend_end_try/zend_catch blocks
Diffstat (limited to 'phpdbg_prompt.c')
-rw-r--r-- | phpdbg_prompt.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c index f2f482b7ec..6d199b0673 100644 --- a/phpdbg_prompt.c +++ b/phpdbg_prompt.c @@ -551,7 +551,8 @@ PHPDBG_COMMAND(run) /* {{{ */ zend_op **orig_opline = EG(opline_ptr); zend_op_array *orig_op_array = EG(active_op_array); zval **orig_retval_ptr = EG(return_value_ptr_ptr); - + zend_bool restore = 1; + if (!PHPDBG_G(ops)) { if (phpdbg_compile(TSRMLS_C) == FAILURE) { phpdbg_error("Failed to compile %s, cannot run", PHPDBG_G(exec)); @@ -586,18 +587,19 @@ PHPDBG_COMMAND(run) /* {{{ */ if (!(PHPDBG_G(flags) & PHPDBG_IS_QUITTING)) { phpdbg_error("Caught exit/error from VM"); - goto out; + restore = 0; } } zend_end_try(); - if (EG(exception)) { - phpdbg_handle_exception(TSRMLS_C); - } - - EG(active_op_array) = orig_op_array; - EG(opline_ptr) = orig_opline; - EG(return_value_ptr_ptr) = orig_retval_ptr; + if (restore) { + if (EG(exception)) { + phpdbg_handle_exception(TSRMLS_C); + } + EG(active_op_array) = orig_op_array; + EG(opline_ptr) = orig_opline; + EG(return_value_ptr_ptr) = orig_retval_ptr; + } } else { phpdbg_error("Nothing to execute!"); } |