summaryrefslogtreecommitdiff
path: root/Zend/zend_API.c
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2004-05-18 21:19:15 +0000
committerMarcus Boerger <helly@php.net>2004-05-18 21:19:15 +0000
commitc8e72410be64c1bc0b8231330d901d2dcd49d63b (patch)
treefc585d74d22ed1285c21edb9b3a857d7fd505a66 /Zend/zend_API.c
parent8d9ced8282f816c3852211d4c5e29715af1b6b08 (diff)
downloadphp-git-c8e72410be64c1bc0b8231330d901d2dcd49d63b.tar.gz
- Need to operate on module pointer in hash table
Diffstat (limited to 'Zend/zend_API.c')
-rw-r--r--Zend/zend_API.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index 010655a89a..ac78284378 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -1162,6 +1162,7 @@ ZEND_API int zend_register_module_ex(zend_module_entry *module TSRMLS_DC)
{
int name_len;
char *lcname;
+ zend_module_entry *module_ptr;
if (!module) {
return FAILURE;
@@ -1173,12 +1174,13 @@ ZEND_API int zend_register_module_ex(zend_module_entry *module TSRMLS_DC)
name_len = strlen(module->name);
lcname = zend_str_tolower_dup(module->name, name_len);
- if (zend_hash_add(&module_registry, lcname, name_len+1, (void *)module, sizeof(zend_module_entry), NULL)==FAILURE) {
+ if (zend_hash_add(&module_registry, lcname, name_len+1, (void *)module, sizeof(zend_module_entry), (void**)&module_ptr)==FAILURE) {
zend_error(E_CORE_WARNING, "Module '%s' already loaded", module->name);
efree(lcname);
return FAILURE;
}
efree(lcname);
+ module = module_ptr;
if (module->functions && zend_register_functions(NULL, module->functions, NULL, module->type TSRMLS_CC)==FAILURE) {
zend_error(E_CORE_WARNING,"%s: Unable to register functions, unable to load", module->name);