Lines Matching refs:module

1650 ZEND_API int zend_startup_module_ex(zend_module_entry *module TSRMLS_DC) /* {{{ */  in zend_startup_module_ex()
1655 if (module->module_started) { in zend_startup_module_ex()
1658 module->module_started = 1; in zend_startup_module_ex()
1661 if (module->deps) { in zend_startup_module_ex()
1662 const zend_module_dep *dep = module->deps; in zend_startup_module_ex()
1674 …NG, "Cannot load module '%s' because required module '%s' is not loaded", module->name, dep->name); in zend_startup_module_ex()
1675 module->module_started = 0; in zend_startup_module_ex()
1685 if (module->globals_size) { in zend_startup_module_ex()
1687 …ts_allocate_id(module->globals_id_ptr, module->globals_size, (ts_allocate_ctor) module->globals_ct… in zend_startup_module_ex()
1689 if (module->globals_ctor) { in zend_startup_module_ex()
1690 module->globals_ctor(module->globals_ptr TSRMLS_CC); in zend_startup_module_ex()
1694 if (module->module_startup_func) { in zend_startup_module_ex()
1695 EG(current_module) = module; in zend_startup_module_ex()
1696 if (module->module_startup_func(module->type, module->module_number TSRMLS_CC)==FAILURE) { in zend_startup_module_ex()
1697 zend_error(E_CORE_ERROR,"Unable to start %s module", module->name); in zend_startup_module_ex()
1745 zend_module_entry *module; in zend_collect_module_handlers() local
1754 zend_hash_get_current_data_ex(&module_registry, (void *) &module, &pos) == SUCCESS; in zend_collect_module_handlers()
1756 if (module->request_startup_func) { in zend_collect_module_handlers()
1759 if (module->request_shutdown_func) { in zend_collect_module_handlers()
1762 if (module->post_deactivate_func) { in zend_collect_module_handlers()
1779 zend_hash_get_current_data_ex(&module_registry, (void *) &module, &pos) == SUCCESS; in zend_collect_module_handlers()
1781 if (module->request_startup_func) { in zend_collect_module_handlers()
1782 module_request_startup_handlers[startup_count++] = module; in zend_collect_module_handlers()
1784 if (module->request_shutdown_func) { in zend_collect_module_handlers()
1785 module_request_shutdown_handlers[--shutdown_count] = module; in zend_collect_module_handlers()
1787 if (module->post_deactivate_func) { in zend_collect_module_handlers()
1788 module_post_deactivate_handlers[--post_deactivate_count] = module; in zend_collect_module_handlers()
1836 ZEND_API zend_module_entry* zend_register_module_ex(zend_module_entry *module TSRMLS_DC) /* {{{ */ in zend_register_module_ex()
1842 if (!module) { in zend_register_module_ex()
1847 zend_printf("%s: Registering module %d\n", module->name, module->module_number); in zend_register_module_ex()
1851 if (module->deps) { in zend_register_module_ex()
1852 const zend_module_dep *dep = module->deps; in zend_register_module_ex()
1862 …nnot load module '%s' because conflicting module '%s' is already loaded", module->name, dep->name); in zend_register_module_ex()
1871 name_len = strlen(module->name); in zend_register_module_ex()
1872 lcname = zend_str_tolower_dup(module->name, name_len); in zend_register_module_ex()
1874 …if (zend_hash_add(&module_registry, lcname, name_len+1, (void *)module, sizeof(zend_module_entry),… in zend_register_module_ex()
1875 zend_error(E_CORE_WARNING, "Module '%s' already loaded", module->name); in zend_register_module_ex()
1880 module = module_ptr; in zend_register_module_ex()
1881 EG(current_module) = module; in zend_register_module_ex()
1883 …if (module->functions && zend_register_functions(NULL, module->functions, NULL, module->type TSRML… in zend_register_module_ex()
1885 zend_error(E_CORE_WARNING,"%s: Unable to register functions, unable to load", module->name); in zend_register_module_ex()
1890 return module; in zend_register_module_ex()
1894 ZEND_API zend_module_entry* zend_register_internal_module(zend_module_entry *module TSRMLS_DC) /* {… in zend_register_internal_module()
1896 module->module_number = zend_next_free_module(); in zend_register_internal_module()
1897 module->type = MODULE_PERSISTENT; in zend_register_internal_module()
1898 return zend_register_module_ex(module TSRMLS_CC); in zend_register_internal_module()
1988 internal_function->module = EG(current_module); in zend_register_functions()
2248 ZEND_API int zend_startup_module(zend_module_entry *module) /* {{{ */ in zend_startup_module() argument
2252 …if ((module = zend_register_internal_module(module TSRMLS_CC)) != NULL && zend_startup_module_ex(m… in zend_startup_module()
2261 zend_module_entry *module; in zend_get_module_started() local
2263 …module_registry, module_name, strlen(module_name)+1, (void**)&module) == SUCCESS && module->module… in zend_get_module_started()
2269 …if ((*ce)->type == ZEND_INTERNAL_CLASS && (*ce)->info.internal.module->module_number == *module_nu… in clean_module_class()
2283 void module_destructor(zend_module_entry *module) /* {{{ */ in module_destructor() argument
2287 if (module->type == MODULE_TEMPORARY) { in module_destructor()
2288 zend_clean_module_rsrc_dtors(module->module_number TSRMLS_CC); in module_destructor()
2289 clean_module_constants(module->module_number TSRMLS_CC); in module_destructor()
2290 clean_module_classes(module->module_number TSRMLS_CC); in module_destructor()
2293 if (module->module_started && module->module_shutdown_func) { in module_destructor()
2295 zend_printf("%s: Module shutdown\n", module->name); in module_destructor()
2297 module->module_shutdown_func(module->type, module->module_number TSRMLS_CC); in module_destructor()
2301 if (module->globals_size) { in module_destructor()
2303 if (*module->globals_id_ptr) { in module_destructor()
2304 ts_free_id(*module->globals_id_ptr); in module_destructor()
2307 if (module->globals_dtor) { in module_destructor()
2308 module->globals_dtor(module->globals_ptr TSRMLS_CC); in module_destructor()
2313 module->module_started=0; in module_destructor()
2314 if (module->functions) { in module_destructor()
2315 zend_unregister_functions(module->functions, -1, NULL TSRMLS_CC); in module_destructor()
2320 if (module->handle && !getenv("ZEND_DONT_UNLOAD_MODULES")) { in module_destructor()
2321 DL_UNLOAD(module->handle); in module_destructor()
2333 zend_module_entry *module = *p; in zend_activate_modules() local
2335 if (module->request_startup_func(module->type, module->module_number TSRMLS_CC)==FAILURE) { in zend_activate_modules()
2336 zend_error(E_WARNING, "request_startup() for %s module failed", module->name); in zend_activate_modules()
2345 int module_registry_cleanup(zend_module_entry *module TSRMLS_DC) /* {{{ */ in module_registry_cleanup()
2347 if (module->request_shutdown_func) { in module_registry_cleanup()
2349 zend_printf("%s: Request shutdown\n", module->name); in module_registry_cleanup()
2351 module->request_shutdown_func(module->type, module->module_number TSRMLS_CC); in module_registry_cleanup()
2368 zend_module_entry *module = *p; in zend_deactivate_modules() local
2370 module->request_shutdown_func(module->type, module->module_number TSRMLS_CC); in zend_deactivate_modules()
2389 int module_registry_unload_temp(const zend_module_entry *module TSRMLS_DC) /* {{{ */ in module_registry_unload_temp()
2391 return (module->type == MODULE_TEMPORARY) ? ZEND_HASH_APPLY_REMOVE : ZEND_HASH_APPLY_STOP; in module_registry_unload_temp()
2395 static int exec_done_cb(zend_module_entry *module TSRMLS_DC) /* {{{ */ in exec_done_cb()
2397 if (module->post_deactivate_func) { in exec_done_cb()
2398 module->post_deactivate_func(); in exec_done_cb()
2413 zend_module_entry *module = *p; in zend_post_deactivate_modules() local
2415 module->post_deactivate_func(); in zend_post_deactivate_modules()
2438 class_entry->info.internal.module = EG(current_module); in do_register_internal_class()
2809 …->function_handler->internal_function.module = (ce_org->type == ZEND_INTERNAL_CLASS) ? ce_org->inf… in zend_is_callable_check_func()
3339 zend_module_entry *module; in zend_get_module_version() local
3342 if (zend_hash_find(&module_registry, lname, name_len + 1, (void**)&module) == FAILURE) { in zend_get_module_version()
3347 return module->version; in zend_get_module_version()