diff options
author | Anatol Belski <ab@php.net> | 2014-10-03 20:30:49 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-10-03 20:30:49 +0200 |
commit | ee4ae7fbc3ba6de5f51f95a621e14a18dd55c95d (patch) | |
tree | d774f5b506e70bc8a70ef22988e2d374bf0756b8 /Zend/zend_execute_API.c | |
parent | 45e23645a42ba939fb1cca9cc099f977af2a4722 (diff) | |
parent | 1ff094deb481234c0aa2fb5b0ee144b7aba924ff (diff) | |
download | php-git-ee4ae7fbc3ba6de5f51f95a621e14a18dd55c95d.tar.gz |
Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
remove the remains of dsp files handling
fix EX usage
remove misprint parentheses
remove misprint parentheses
Replaced EG(This) and EX(object) with EX(This). Internal functions now recieves zend_execute_data as the first argument.
And this one...
It should be in extern c
Remove useless condition
NEWS entry for previous commit
NEWS entry for previous commit
add IPv6 support to php-fpm
Micro optimization for the most frequency case
Add hash to EXTENSIONS file
Remove extensions which are long gone
we also have xz release tarballs since 5.5
Fix ZTS build
improved file size computation in stat()
Fixed incorrect compilation
5.5.19 now
Diffstat (limited to 'Zend/zend_execute_API.c')
-rw-r--r-- | Zend/zend_execute_API.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index be8b5afe09..a4bf8f62fd 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -187,8 +187,6 @@ void init_executor(TSRMLS_D) /* {{{ */ EG(scope) = NULL; - ZVAL_OBJ(&EG(This), NULL); - EG(active) = 1; } /* }}} */ @@ -660,7 +658,6 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS zend_execute_data *call, dummy_execute_data; zend_fcall_info_cache fci_cache_local; zend_function *func; - zend_object *orig_object; zend_class_entry *orig_scope; zval tmp; @@ -682,7 +679,6 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS break; } - orig_object = Z_OBJ(EG(This)); orig_scope = EG(scope); /* Initialize execute_data */ @@ -832,10 +828,11 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS EG(scope) = calling_scope; if (!fci->object || (func->common.fn_flags & ZEND_ACC_STATIC)) { - Z_OBJ(EG(This)) = call->object = NULL; + Z_OBJ(call->This) = NULL; + Z_TYPE_INFO(call->This) = IS_UNDEF; } else { - Z_OBJ(EG(This)) = fci->object; - Z_ADDREF(EG(This)); + ZVAL_OBJ(&call->This, fci->object); + GC_REFCOUNT(fci->object)++; } if (func->type == ZEND_USER_FUNCTION) { @@ -858,7 +855,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS EG(current_execute_data) = call; if (EXPECTED(zend_execute_internal == NULL)) { /* saves one function call if zend_execute_internal is not used */ - func->internal_function.handler(fci->param_count, fci->retval TSRMLS_CC); + func->internal_function.handler(call, fci->retval TSRMLS_CC); } else { zend_execute_internal(call, fci->retval TSRMLS_CC); } @@ -888,7 +885,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS if (fci->object) { call->prev_execute_data = EG(current_execute_data); EG(current_execute_data) = call; - fci->object->handlers->call_method(func->common.function_name, fci->object, fci->param_count, fci->retval TSRMLS_CC); + fci->object->handlers->call_method(func->common.function_name, fci->object, call, fci->retval TSRMLS_CC); EG(current_execute_data) = call->prev_execute_data; } else { zend_error_noreturn(E_ERROR, "Cannot call overloaded function for non-object"); @@ -908,11 +905,10 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS } } - if (Z_OBJ(EG(This))) { - zval_ptr_dtor(&EG(This)); + if (fci->object && !(func->common.fn_flags & ZEND_ACC_STATIC)) { + OBJ_RELEASE(fci->object); } - Z_OBJ(EG(This)) = orig_object; EG(scope) = orig_scope; if (EG(current_execute_data) == &dummy_execute_data) { EG(current_execute_data) = dummy_execute_data.prev_execute_data; |