mirror of
https://github.com/php/php-src.git
synced 2024-09-22 18:37:25 +00:00
Optimization of module unloading (temporary modules can be only in the end)
This commit is contained in:
parent
8ec6d16867
commit
53e1f2adfb
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user