summaryrefslogtreecommitdiff
path: root/Zend/zend_execute_API.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_execute_API.c')
-rw-r--r--Zend/zend_execute_API.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index 16853bcadb..8a3f147bfb 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -115,8 +115,7 @@ void init_executor(CLS_D ELS_DC)
original_sigsegv_handler = signal(SIGSEGV, zend_handle_sigsegv);
#endif
EG(return_value_ptr_ptr) = &EG(global_return_value_ptr);
- EG(global_return_value_ptr) = &EG(global_return_value);
- INIT_ZVAL(EG(global_return_value));
+ EG(global_return_value_ptr) = NULL;
EG(symtable_cache_ptr) = EG(symtable_cache)-1;
EG(symtable_cache_limit)=EG(symtable_cache)+SYMTABLE_CACHE_SIZE-1;
@@ -129,7 +128,6 @@ void init_executor(CLS_D ELS_DC)
zend_ptr_stack_init(&EG(argument_stack));
- EG(main_op_array) = NULL;
zend_hash_init(&EG(symbol_table), 50, NULL, ZVAL_PTR_DTOR, 0);
EG(active_symbol_table) = &EG(symbol_table);
@@ -155,11 +153,6 @@ void init_executor(CLS_D ELS_DC)
void shutdown_executor(ELS_D)
{
- if (EG(global_return_value_ptr) == &EG(global_return_value)) {
- zval_dtor(&EG(global_return_value));
- } else {
- zval_ptr_dtor(EG(return_value_ptr_ptr));
- }
zend_ptr_stack_destroy(&EG(arg_types_stack));
while (EG(symtable_cache_ptr)>=EG(symtable_cache)) {
@@ -180,10 +173,6 @@ void shutdown_executor(ELS_D)
zend_ptr_stack_destroy(&EG(argument_stack));
/* Destroy all op arrays */
- if (EG(main_op_array)) {
- destroy_op_array(EG(main_op_array));
- efree(EG(main_op_array));
- }
zend_hash_apply(EG(function_table), (int (*)(void *)) is_not_internal_function);
zend_hash_apply(EG(class_table), (int (*)(void *)) is_not_internal_class);
@@ -236,8 +225,8 @@ ZEND_API char *get_active_function_name()
ZEND_API char *zend_get_executed_filename(ELS_D)
{
- if (EG(opline_ptr)) {
- return active_opline->filename;
+ if (EG(active_op_array)) {
+ return EG(active_op_array)->filename;
} else {
return "[no active file]";
}