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);
}
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;
}