Lines Matching refs:module

1826 ZEND_API int zend_startup_module_ex(zend_module_entry *module) /* {{{ */  in zend_startup_module_ex()  argument
1831 if (module->module_started) { in zend_startup_module_ex()
1834 module->module_started = 1; in zend_startup_module_ex()
1837 if (module->deps) { in zend_startup_module_ex()
1838 const zend_module_dep *dep = module->deps; in zend_startup_module_ex()
1851 …NG, "Cannot load module '%s' because required module '%s' is not loaded", module->name, dep->name); in zend_startup_module_ex()
1852 module->module_started = 0; in zend_startup_module_ex()
1862 if (module->globals_size) { in zend_startup_module_ex()
1864 …ts_allocate_id(module->globals_id_ptr, module->globals_size, (ts_allocate_ctor) module->globals_ct… in zend_startup_module_ex()
1866 if (module->globals_ctor) { in zend_startup_module_ex()
1867 module->globals_ctor(module->globals_ptr); in zend_startup_module_ex()
1871 if (module->module_startup_func) { in zend_startup_module_ex()
1872 EG(current_module) = module; in zend_startup_module_ex()
1873 if (module->module_startup_func(module->type, module->module_number)==FAILURE) { in zend_startup_module_ex()
1874 zend_error_noreturn(E_CORE_ERROR,"Unable to start %s module", module->name); in zend_startup_module_ex()
1886 zend_module_entry *module = Z_PTR_P(zv); in zend_startup_module_zval() local
1888 return (zend_startup_module_ex(module) == SUCCESS) ? ZEND_HASH_APPLY_KEEP : ZEND_HASH_APPLY_REMOVE; in zend_startup_module_zval()
1929 zend_module_entry *module; in zend_collect_module_handlers() local
1937 ZEND_HASH_FOREACH_PTR(&module_registry, module) { in zend_collect_module_handlers()
1938 if (module->request_startup_func) { in zend_collect_module_handlers()
1941 if (module->request_shutdown_func) { in zend_collect_module_handlers()
1944 if (module->post_deactivate_func) { in zend_collect_module_handlers()
1960 ZEND_HASH_FOREACH_PTR(&module_registry, module) { in zend_collect_module_handlers()
1961 if (module->request_startup_func) { in zend_collect_module_handlers()
1962 module_request_startup_handlers[startup_count++] = module; in zend_collect_module_handlers()
1964 if (module->request_shutdown_func) { in zend_collect_module_handlers()
1965 module_request_shutdown_handlers[--shutdown_count] = module; in zend_collect_module_handlers()
1967 if (module->post_deactivate_func) { in zend_collect_module_handlers()
1968 module_post_deactivate_handlers[--post_deactivate_count] = module; in zend_collect_module_handlers()
2012 ZEND_API zend_module_entry* zend_register_module_ex(zend_module_entry *module) /* {{{ */ in zend_register_module_ex() argument
2018 if (!module) { in zend_register_module_ex()
2023 zend_printf("%s: Registering module %d\n", module->name, module->module_number); in zend_register_module_ex()
2027 if (module->deps) { in zend_register_module_ex()
2028 const zend_module_dep *dep = module->deps; in zend_register_module_ex()
2039 …nnot load module '%s' because conflicting module '%s' is already loaded", module->name, dep->name); in zend_register_module_ex()
2048 name_len = strlen(module->name); in zend_register_module_ex()
2050 zend_str_tolower_copy(ZSTR_VAL(lcname), module->name, name_len); in zend_register_module_ex()
2053 …if ((module_ptr = zend_hash_add_mem(&module_registry, lcname, module, sizeof(zend_module_entry))) … in zend_register_module_ex()
2054 zend_error(E_CORE_WARNING, "Module '%s' already loaded", module->name); in zend_register_module_ex()
2058 module = module_ptr; in zend_register_module_ex()
2059 EG(current_module) = module; in zend_register_module_ex()
2061 …if (module->functions && zend_register_functions(NULL, module->functions, NULL, module->type)==FAI… in zend_register_module_ex()
2065 zend_error(E_CORE_WARNING,"%s: Unable to register functions, unable to load", module->name); in zend_register_module_ex()
2071 return module; in zend_register_module_ex()
2075 ZEND_API zend_module_entry* zend_register_internal_module(zend_module_entry *module) /* {{{ */ in zend_register_internal_module() argument
2077 module->module_number = zend_next_free_module(); in zend_register_internal_module()
2078 module->type = MODULE_PERSISTENT; in zend_register_internal_module()
2079 return zend_register_module_ex(module); in zend_register_internal_module()
2172 internal_function->module = EG(current_module); in zend_register_functions()
2515 ZEND_API int zend_startup_module(zend_module_entry *module) /* {{{ */ in zend_startup_module() argument
2517 …if ((module = zend_register_internal_module(module)) != NULL && zend_startup_module_ex(module) == … in zend_startup_module()
2526 zend_module_entry *module; in zend_get_module_started() local
2528 module = zend_hash_str_find_ptr(&module_registry, module_name, strlen(module_name)); in zend_get_module_started()
2529 return (module && module->module_started) ? SUCCESS : FAILURE; in zend_get_module_started()
2537 if (ce->type == ZEND_INTERNAL_CLASS && ce->info.internal.module->module_number == module_number) { in clean_module_class()
2551 void module_destructor(zend_module_entry *module) /* {{{ */ in module_destructor() argument
2554 if (module->type == MODULE_TEMPORARY) { in module_destructor()
2555 zend_clean_module_rsrc_dtors(module->module_number); in module_destructor()
2556 clean_module_constants(module->module_number); in module_destructor()
2557 clean_module_classes(module->module_number); in module_destructor()
2560 if (module->module_started && module->module_shutdown_func) { in module_destructor()
2562 zend_printf("%s: Module shutdown\n", module->name); in module_destructor()
2564 module->module_shutdown_func(module->type, module->module_number); in module_destructor()
2568 if (module->globals_size) { in module_destructor()
2570 if (*module->globals_id_ptr) { in module_destructor()
2571 ts_free_id(*module->globals_id_ptr); in module_destructor()
2574 if (module->globals_dtor) { in module_destructor()
2575 module->globals_dtor(module->globals_ptr); in module_destructor()
2580 module->module_started=0; in module_destructor()
2581 if (module->functions) { in module_destructor()
2582 zend_unregister_functions(module->functions, -1, NULL); in module_destructor()
2586 if (module->handle && !getenv("ZEND_DONT_UNLOAD_MODULES")) { in module_destructor()
2587 DL_UNLOAD(module->handle); in module_destructor()
2598 zend_module_entry *module = *p; in zend_activate_modules() local
2600 if (module->request_startup_func(module->type, module->module_number)==FAILURE) { in zend_activate_modules()
2601 zend_error(E_WARNING, "request_startup() for %s module failed", module->name); in zend_activate_modules()
2612 zend_module_entry *module = Z_PTR_P(zv); in module_registry_cleanup() local
2614 if (module->request_shutdown_func) { in module_registry_cleanup()
2616 zend_printf("%s: Request shutdown\n", module->name); in module_registry_cleanup()
2618 module->request_shutdown_func(module->type, module->module_number); in module_registry_cleanup()
2635 zend_module_entry *module = *p; in zend_deactivate_modules() local
2637 module->request_shutdown_func(module->type, module->module_number); in zend_deactivate_modules()
2656 int module_registry_unload_temp(const zend_module_entry *module) /* {{{ */ in module_registry_unload_temp() argument
2658 return (module->type == MODULE_TEMPORARY) ? ZEND_HASH_APPLY_REMOVE : ZEND_HASH_APPLY_STOP; in module_registry_unload_temp()
2664 zend_module_entry *module = (zend_module_entry *)Z_PTR_P(el); in module_registry_unload_temp_wrapper() local
2665 return module_registry_unload_temp((const zend_module_entry *)module); in module_registry_unload_temp_wrapper()
2671 zend_module_entry *module = (zend_module_entry *)Z_PTR_P(el); in exec_done_cb() local
2672 if (module->post_deactivate_func) { in exec_done_cb()
2673 module->post_deactivate_func(); in exec_done_cb()
2688 zend_module_entry *module = *p; in zend_post_deactivate_modules() local
2690 module->post_deactivate_func(); in zend_post_deactivate_modules()
2713 class_entry->info.internal.module = EG(current_module); in do_register_internal_class()
3697 zend_module_entry *module; in zend_get_module_version() local
3701 module = zend_hash_find_ptr(&module_registry, lname); in zend_get_module_version()
3703 return module ? module->version : NULL; in zend_get_module_version()