cvs: ZendEngine2 / zend_execute.c
| From: | Marcus Boerger | Date: | Sun, 17 Aug 2003 12:27:33 +0000 |
| Subject: | cvs: ZendEngine2 / zend_execute.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-1639@lists.php.net to get a copy of this message | ||
helly Sun Aug 17 08:27:33 2003 EDT
Modified files:
/ZendEngine2 zend_execute.c
Log:
Put the code where it belongs - fixes a warning and confusion
Index: ZendEngine2/zend_execute.c
diff -u ZendEngine2/zend_execute.c:1.521 ZendEngine2/zend_execute.c:1.522
--- ZendEngine2/zend_execute.c:1.521 Sun Aug 17 08:17:34 2003
+++ ZendEngine2/zend_execute.c Sun Aug 17 08:27:33 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_execute.c,v 1.521 2003/08/17 12:17:34 helly Exp $ */
+/* $Id: zend_execute.c,v 1.522 2003/08/17 12:27:33 helly Exp $ */
#define ZEND_INTENSIVE_DEBUGGING 0
@@ -2378,15 +2378,14 @@
{
zval *function_name;
zend_class_entry *ce;
- zend_bool is_const = 1;
- char *function_name_strval;
- int function_name_strlen;
zend_ptr_stack_n_push(&EG(arg_types_stack), 3, EX(fbc), EX(object), EX(calling_scope));
ce = EX_T(EX(opline)->op1.u.var).EA.class_entry;
if(EX(opline)->op2.op_type != IS_UNUSED) {
- is_const = (EX(opline)->op2.op_type == IS_CONST);
+ char *function_name_strval;
+ int function_name_strlen;
+ zend_bool is_const = (EX(opline)->op2.op_type == IS_CONST);
if (is_const) {
function_name_strval = EX(opline)->op2.u.constant.value.str.val;
@@ -2399,6 +2398,11 @@
}
EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
+
+ if (!is_const) {
+ efree(function_name_strval);
+ FREE_OP(EX(Ts), &EX(opline)->op2, EG(free_op2));
+ }
} else {
if(!ce->constructor) {
zend_error(E_ERROR, "Can not call constructor");
@@ -2407,11 +2411,6 @@
}
EX(calling_scope) = EX(fbc)->common.scope;
-
- if (!is_const) {
- efree(function_name_strval);
- FREE_OP(EX(Ts), &EX(opline)->op2, EG(free_op2));
- }
if (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) {
EX(object) = NULL;