From: Stanislav Malyshev Date: Mon, 1 Sep 2014 19:22:41 +0000 (-0700) Subject: Merge branch 'PHP-5.6' X-Git-Tag: PRE_PHP7_REMOVALS~165 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aaf5689f4d6e523fd78e0291dbbcd78f3ea988dc;p=php Merge branch 'PHP-5.6' * PHP-5.6: update NEWS Only destruct if EG(active) in zend_shutdown(). (bug #65463, #66036) Fix typo from commit 32314f6b6 Fix destruction order in zend_shutdown (bug #65463, #66036) Conflicts: Zend/zend_compile.h Zend/zend_execute_API.c --- aaf5689f4d6e523fd78e0291dbbcd78f3ea988dc diff --cc Zend/zend_compile.h index 71a622f417,876e8ec5f2..8888b6ea1f --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@@ -487,17 -680,21 +487,21 @@@ ZEND_API int open_file_for_scanning(zen ZEND_API void init_op_array(zend_op_array *op_array, zend_uchar type, int initial_ops_size TSRMLS_DC); ZEND_API void destroy_op_array(zend_op_array *op_array TSRMLS_DC); ZEND_API void zend_destroy_file_handle(zend_file_handle *file_handle TSRMLS_DC); -ZEND_API int zend_cleanup_class_data(zend_class_entry **pce TSRMLS_DC); -ZEND_API int zend_cleanup_user_class_data(zend_class_entry **pce TSRMLS_DC); +ZEND_API void zend_cleanup_user_class_data(zend_class_entry *ce TSRMLS_DC); ZEND_API void zend_cleanup_internal_class_data(zend_class_entry *ce TSRMLS_DC); ZEND_API void zend_cleanup_internal_classes(TSRMLS_D); +ZEND_API void zend_cleanup_op_array_data(zend_op_array *op_array); + ZEND_API int zend_cleanup_function_data(zend_function *function TSRMLS_DC); + ZEND_API int zend_cleanup_function_data_full(zend_function *function TSRMLS_DC); + ZEND_API int clean_non_persistent_function_full(zend_function *function TSRMLS_DC); + ZEND_API int clean_non_persistent_class_full(zend_class_entry **ce TSRMLS_DC); ZEND_API void destroy_zend_function(zend_function *function TSRMLS_DC); -ZEND_API void zend_function_dtor(zend_function *function); -ZEND_API void destroy_zend_class(zend_class_entry **pce); -void zend_class_add_ref(zend_class_entry **ce); +ZEND_API void zend_function_dtor(zval *zv); +ZEND_API void destroy_zend_class(zval *zv); +void zend_class_add_ref(zval *zv); -ZEND_API void zend_mangle_property_name(char **dest, int *dest_length, const char *src1, int src1_length, const char *src2, int src2_length, int internal); +ZEND_API zend_string *zend_mangle_property_name(const char *src1, int src1_length, const char *src2, int src2_length, int internal); #define zend_unmangle_property_name(mangled_property, mangled_property_len, class_name, prop_name) \ zend_unmangle_property_name_ex(mangled_property, mangled_property_len, class_name, prop_name, NULL) ZEND_API int zend_unmangle_property_name_ex(const char *mangled_property, int mangled_property_len, const char **class_name, const char **prop_name, int *prop_len); diff --cc Zend/zend_execute_API.c index 5984e2dc82,243da3fde1..7842ecfb91 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@@ -110,9 -109,8 +110,9 @@@ static int clean_non_persistent_functio } /* }}} */ - static int clean_non_persistent_function_full(zval *zv TSRMLS_DC) /* {{{ */ -ZEND_API int clean_non_persistent_function_full(zend_function *function TSRMLS_DC) /* {{{ */ ++ZEND_API 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; } /* }}} */ @@@ -124,10 -121,9 +124,10 @@@ static int clean_non_persistent_class(z } /* }}} */ - static int clean_non_persistent_class_full(zval *zv TSRMLS_DC) /* {{{ */ -ZEND_API int clean_non_persistent_class_full(zend_class_entry **ce TSRMLS_DC) /* {{{ */ ++ZEND_API 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; } /* }}} */