cvs: ZendEngine2 / zend_builtin_functions.c zend_execute.c

From: Date: Wed, 08 May 2002 18:43:20 +0000
Subject: cvs: ZendEngine2 / zend_builtin_functions.c zend_execute.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-103@lists.php.net to get a copy of this message
andi Wed May 8 14:43:20 2002 EDT Modified files: /ZendEngine2 zend_builtin_functions.c zend_execute.c Log: - Hopefully fix problems with debug_backtrace() Index: ZendEngine2/zend_builtin_functions.c diff -u ZendEngine2/zend_builtin_functions.c:1.121 ZendEngine2/zend_builtin_functions.c:1.122 --- ZendEngine2/zend_builtin_functions.c:1.121 Wed May 8 10:10:30 2002 +++ ZendEngine2/zend_builtin_functions.c Wed May 8 14:43:18 2002 @@ -1203,9 +1203,12 @@ if (ptr->object) { printf("%s::", Z_OBJCE(*ptr->object)->name); } + if (ptr->function_state.function->common.scope) { + printf("%s::", ptr->function_state.function->common.scope->name); + } function_name = ptr->function_state.function->common.function_name; if (!function_name) { - function_name = "main"; + function_name = "_main_"; } ptr = ptr->prev_execute_data; Index: ZendEngine2/zend_execute.c diff -u ZendEngine2/zend_execute.c:1.340 ZendEngine2/zend_execute.c:1.341 --- ZendEngine2/zend_execute.c:1.340 Tue May 7 14:42:13 2002 +++ ZendEngine2/zend_execute.c Wed May 8 14:43:19 2002 @@ -2748,11 +2748,24 @@ FREE_OP(EX(Ts), &EX(opline)->op1, EG(free_op1)); EX(Ts)[EX(opline)->result.u.var].var.ptr_ptr = &EX(Ts)[EX(opline)->result.u.var].var.ptr; if (new_op_array) { + zval *saved_object; + zend_function *saved_function; + + EG(return_value_ptr_ptr) = EX(Ts)[EX(opline)->result.u.var].var.ptr_ptr; EG(active_op_array) = new_op_array; EX(Ts)[EX(opline)->result.u.var].var.ptr = NULL; + saved_object = EX(object); + saved_function = EX(function_state).function; + + EX(function_state).function = (zend_function *) new_op_array; + EX(object) = NULL; + zend_execute(new_op_array TSRMLS_CC); + + EX(function_state).function = saved_function; + EX(object) = saved_object; if (!return_value_used) { if (EX(Ts)[EX(opline)->result.u.var].var.ptr) {

« previous php.zend-engine.cvs (#103) next »