summaryrefslogtreecommitdiff
path: root/ext/spl/spl_engine.c
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2003-08-07 22:43:01 +0000
committerMarcus Boerger <helly@php.net>2003-08-07 22:43:01 +0000
commit0040355af86ed307114856d9d01f61ab2d40096a (patch)
treed3d8276645c42daaeb7df07066b7999983b1d00d /ext/spl/spl_engine.c
parent47a80fee58c75464028a78c5a48c074cb22e8a71 (diff)
downloadphp-git-0040355af86ed307114856d9d01f61ab2d40096a.tar.gz
- Reduce number of c-functions/macros involved in function invocation
- Unify names of remaining c-function/macro names
Diffstat (limited to 'ext/spl/spl_engine.c')
-rwxr-xr-xext/spl/spl_engine.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/spl/spl_engine.c b/ext/spl/spl_engine.c
index c19f061421..7d4f24d069 100755
--- a/ext/spl/spl_engine.c
+++ b/ext/spl/spl_engine.c
@@ -176,6 +176,7 @@ int spl_call_method(zval **object_pp, zend_class_entry *obj_ce, zend_function **
int result;
zend_fcall_info fci;
zval z_fname;
+ zval *retval;
zval **params[2];
@@ -186,7 +187,7 @@ int spl_call_method(zval **object_pp, zend_class_entry *obj_ce, zend_function **
/*fci.function_table = NULL; will be read form zend_class_entry of object if needed */
fci.object_pp = object_pp;
fci.function_name = &z_fname;
- fci.retval_ptr_ptr = retval_ptr;
+ fci.retval_ptr_ptr = retval_ptr ? retval_ptr : &retval;
fci.param_count = param_count;
fci.params = params;
fci.no_separation = 1;
@@ -216,6 +217,10 @@ int spl_call_method(zval **object_pp, zend_class_entry *obj_ce, zend_function **
result = zend_call_function(&fci, &fcic TSRMLS_CC);
}
}
+ if (!retval_ptr && fci.retval_ptr_ptr) {
+ zval_dtor(*fci.retval_ptr_ptr);
+ FREE_ZVAL(*fci.retval_ptr_ptr);
+ }
return result;
}
/* }}} */