Commit:    9b51a3b96d89dc10d4ea65ceacaad22fa3420ea7
Author:    Nikita Popov <ni...@php.net>         Sat, 19 May 2012 14:21:49 +0200
Parents:   252f623464e7cf5cb794903ba07d652c9cea9a14
Branches:  master

Link:       
http://git.php.net/?p=php-src.git;a=commitdiff;h=9b51a3b96d89dc10d4ea65ceacaad22fa3420ea7

Log:
Minor code cleanup

The block for the foreach separator was nested unnecessary. This commit
simply removes that nesting.

Changed paths:
  M  Zend/zend_compile.c


Diff:
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 399a37c..0d3ea10 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -1725,7 +1725,7 @@ void zend_do_begin_function_declaration(znode 
*function_token, znode *function_n
        }
 
        {
-               /* Push a seperator to the switch and foreach stacks */
+               /* Push a seperator to the switch stack */
                zend_switch_entry switch_entry;
 
                switch_entry.cond.op_type = IS_UNUSED;
@@ -1733,16 +1733,16 @@ void zend_do_begin_function_declaration(znode 
*function_token, znode *function_n
                switch_entry.control_var = 0;
 
                zend_stack_push(&CG(switch_cond_stack), (void *) &switch_entry, 
sizeof(switch_entry));
+       }
 
-               {
-                       /* Foreach stack separator */
-                       zend_op dummy_opline;
+       {
+               /* Push a separator to the foreach stack */
+               zend_op dummy_opline;
 
-                       dummy_opline.result_type = IS_UNUSED;
-                       dummy_opline.op1_type = IS_UNUSED;
+               dummy_opline.result_type = IS_UNUSED;
+               dummy_opline.op1_type = IS_UNUSED;
 
-                       zend_stack_push(&CG(foreach_copy_stack), (void *) 
&dummy_opline, sizeof(zend_op));
-               }
+               zend_stack_push(&CG(foreach_copy_stack), (void *) 
&dummy_opline, sizeof(zend_op));
        }
 
        if (CG(doc_comment)) {


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to