1
0
mirror of https://github.com/php/php-src.git synced 2026-04-03 14:12:38 +02:00

- By mistake commited this to the branch. It fixes a bug we introduced with

the return reference patch.
This commit is contained in:
Andi Gutmans
1999-12-17 08:24:10 +00:00
parent 6aa9078d16
commit 7fe808ea02
3 changed files with 6 additions and 6 deletions

View File

@@ -179,9 +179,9 @@ statement:
| T_BREAK expr ';' { do_brk_cont(ZEND_BRK, &$2 CLS_CC); }
| T_CONTINUE ';' { do_brk_cont(ZEND_CONT, NULL CLS_CC); }
| T_CONTINUE expr ';' { do_brk_cont(ZEND_CONT, &$2 CLS_CC); }
| T_RETURN ';' { do_return(NULL CLS_CC); }
| T_RETURN expr_without_variable ';' { do_return(&$2 CLS_CC); }
| T_RETURN cvar ';' { do_return(&$2 CLS_CC); }
| T_RETURN ';' { do_return(NULL, 0 CLS_CC); }
| T_RETURN expr_without_variable ';' { do_return(&$2, 0 CLS_CC); }
| T_RETURN cvar ';' { do_return(&$2, 1 CLS_CC); }
| T_GLOBAL global_var_list
| T_STATIC static_var_list
| T_ECHO echo_expr_list ';'

View File

@@ -965,11 +965,11 @@ static int generate_free_foreach_copy(znode *foreach_copy CLS_DC)
return 0;
}
void do_return(znode *expr CLS_DC)
void do_return(znode *expr, int do_end_vparse CLS_DC)
{
zend_op *opline;
if (expr->op_type==IS_VAR) {
if (do_end_vparse) {
if (CG(active_op_array)->return_reference) {
do_end_variable_parse(BP_VAR_W, 0 CLS_CC);
} else {

View File

@@ -268,7 +268,7 @@ int do_begin_function_call(znode *function_name CLS_DC);
void do_begin_dynamic_function_call(znode *function_name CLS_DC);
void do_begin_class_member_function_call(znode *class_name, znode *function_name CLS_DC);
void do_end_function_call(znode *function_name, znode *result, znode *argument_list, int is_method, int is_dynamic_fcall CLS_DC);
void do_return(znode *expr CLS_DC);
void do_return(znode *expr, int do_end_vparse CLS_DC);
ZEND_API int do_bind_function_or_class(zend_op *opline, HashTable *function_table, HashTable *class_table, int compile_time);
void do_early_binding(CLS_D);