Browse Source

Exposed zend_clean_and_cache_symbol_table() and fixed incorrect efree()

pull/872/head
Dmitry Stogov 11 years ago
parent
commit
7fd3375fb5
  1. 4
      Zend/zend_execute.c
  2. 2
      Zend/zend_execute.h

4
Zend/zend_execute.c

@ -1370,11 +1370,11 @@ ZEND_API void execute_internal(zend_execute_data *execute_data, zval *return_val
execute_data->func->internal_function.handler(execute_data, return_value TSRMLS_CC);
}
void zend_clean_and_cache_symbol_table(zend_array *symbol_table TSRMLS_DC) /* {{{ */
ZEND_API void zend_clean_and_cache_symbol_table(zend_array *symbol_table TSRMLS_DC) /* {{{ */
{
if (EG(symtable_cache_ptr) >= EG(symtable_cache_limit)) {
zend_hash_destroy(&symbol_table->ht);
FREE_HASHTABLE(symbol_table);
efree_size(symbol_table, sizeof(zend_array));
} else {
/* clean before putting into the cache, since clean
could call dtors, which could use cached hash */

2
Zend/zend_execute.h

@ -314,7 +314,7 @@ ZEND_API zval *zend_get_zval_ptr(int op_type, const znode_op *node, const zend_e
ZEND_API int zend_do_fcall(ZEND_OPCODE_HANDLER_ARGS);
void zend_clean_and_cache_symbol_table(zend_array *symbol_table TSRMLS_DC);
ZEND_API void zend_clean_and_cache_symbol_table(zend_array *symbol_table TSRMLS_DC);
void zend_free_compiled_variables(zend_execute_data *execute_data TSRMLS_DC);
#define CACHED_PTR(num) \

Loading…
Cancel
Save