1
0
mirror of https://github.com/php/php-src.git synced 2026-04-27 18:23:26 +02:00

Optimization of module unloading (temporary modules can be only in the end)

This commit is contained in:
Dmitry Stogov
2006-03-17 08:34:34 +00:00
parent 8ec6d16867
commit 53e1f2adfb
2 changed files with 2 additions and 6 deletions
+1 -1
View File
@@ -1358,7 +1358,7 @@ static int exec_done_cb(zend_module_entry *module TSRMLS_DC)
void zend_post_deactivate_modules(TSRMLS_D)
{
zend_hash_apply(&module_registry, (apply_func_t) exec_done_cb TSRMLS_CC);
zend_hash_apply(&module_registry, (apply_func_t) module_registry_unload_temp TSRMLS_CC);
zend_hash_reverse_apply(&module_registry, (apply_func_t) module_registry_unload_temp TSRMLS_CC);
}
+1 -5
View File
@@ -2319,11 +2319,7 @@ int module_registry_cleanup(zend_module_entry *module TSRMLS_DC)
int module_registry_unload_temp(zend_module_entry *module TSRMLS_DC)
{
switch (module->type) {
case MODULE_TEMPORARY:
return 1;
}
return 0;
return (module->type == MODULE_TEMPORARY) ? ZEND_HASH_APPLY_REMOVE : ZEND_HASH_APPLY_STOP;
}