cvs: ZendEngine2 / zend_execute_API.c

From: Date: Thu, 11 Sep 2003 17:04:26 +0000
Subject: cvs: ZendEngine2 / zend_execute_API.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-1828@lists.php.net to get a copy of this message
stas Thu Sep 11 13:04:26 2003 EDT Modified files: /ZendEngine2 zend_execute_API.c Log: Use scope from method, not from object Index: ZendEngine2/zend_execute_API.c diff -u ZendEngine2/zend_execute_API.c:1.234 ZendEngine2/zend_execute_API.c:1.235 --- ZendEngine2/zend_execute_API.c:1.234 Mon Sep 1 09:04:55 2003 +++ ZendEngine2/zend_execute_API.c Thu Sep 11 13:04:26 2003 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_execute_API.c,v 1.234 2003/09/01 13:04:55 helly Exp $ */ +/* $Id: zend_execute_API.c,v 1.235 2003/09/11 17:04:26 stas Exp $ */ #include <stdio.h> #include <signal.h> @@ -718,8 +718,10 @@ EX(prev_execute_data) = EG(current_execute_data); EG(current_execute_data) = &execute_data; + if (EX(function_state).function->type == ZEND_USER_FUNCTION) { calling_symbol_table = EG(active_symbol_table); + EG(scope) = EX(function_state).function->common.scope; if (fci->symbol_table) { EG(active_symbol_table) = fci->symbol_table; } else { @@ -751,6 +753,9 @@ EG(binary_op) = orig_binary_op; } else { ALLOC_INIT_ZVAL(*fci->retval_ptr_ptr); + if(EX(function_state).function->common.scope) { + EG(scope) = EX(function_state).function->common.scope; + } ((zend_internal_function *) EX(function_state).function)->handler(fci->param_count, *fci->retval_ptr_ptr, (fci->object_pp?*fci->object_pp:NULL), 1 TSRMLS_CC); INIT_PZVAL(*fci->retval_ptr_ptr); }

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