From: Dmitry Stogov Date: Tue, 18 Mar 2014 10:52:54 +0000 (+0400) Subject: Fixed cleanup on request shutdown X-Git-Tag: POST_PHPNG_MERGE~412^2~275 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=da9a2872b0170d74ea1fce95af710bdb1242644c;p=php Fixed cleanup on request shutdown --- diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 339a71b901..73c00eae03 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -103,27 +103,31 @@ static void zend_extension_deactivator(zend_extension *extension TSRMLS_DC) /* { } /* }}} */ -static int clean_non_persistent_function(zend_function *function TSRMLS_DC) /* {{{ */ +static int clean_non_persistent_function(zval *zv TSRMLS_DC) /* {{{ */ { + zend_function *function = Z_PTR_P(zv); return (function->type == ZEND_INTERNAL_FUNCTION) ? ZEND_HASH_APPLY_STOP : ZEND_HASH_APPLY_REMOVE; } /* }}} */ -static int clean_non_persistent_function_full(zend_function *function TSRMLS_DC) /* {{{ */ +static int clean_non_persistent_function_full(zval *zv TSRMLS_DC) /* {{{ */ { + zend_function *function = Z_PTR_P(zv); return (function->type == ZEND_INTERNAL_FUNCTION) ? ZEND_HASH_APPLY_KEEP : ZEND_HASH_APPLY_REMOVE; } /* }}} */ -static int clean_non_persistent_class(zend_class_entry **ce TSRMLS_DC) /* {{{ */ +static int clean_non_persistent_class(zval *zv TSRMLS_DC) /* {{{ */ { - return ((*ce)->type == ZEND_INTERNAL_CLASS) ? ZEND_HASH_APPLY_STOP : ZEND_HASH_APPLY_REMOVE; + zend_class_entry *ce = Z_PTR_P(zv); + return (ce->type == ZEND_INTERNAL_CLASS) ? ZEND_HASH_APPLY_STOP : ZEND_HASH_APPLY_REMOVE; } /* }}} */ -static int clean_non_persistent_class_full(zend_class_entry **ce TSRMLS_DC) /* {{{ */ +static int clean_non_persistent_class_full(zval *zv TSRMLS_DC) /* {{{ */ { - return ((*ce)->type == ZEND_INTERNAL_CLASS) ? ZEND_HASH_APPLY_KEEP : ZEND_HASH_APPLY_REMOVE; + zend_class_entry *ce = Z_PTR_P(zv); + return (ce->type == ZEND_INTERNAL_CLASS) ? ZEND_HASH_APPLY_KEEP : ZEND_HASH_APPLY_REMOVE; } /* }}} */