cvs: ZendEngine2 / zend_API.c
| From: | Marcus Boerger | Date: | Wed, 12 May 2004 23:03:42 +0000 |
| Subject: | cvs: ZendEngine2 / zend_API.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-2636@lists.php.net to get a copy of this message | ||
helly Wed May 12 19:03:42 2004 EDT
Modified files:
/ZendEngine2 zend_API.c
Log:
- Revert to 1.249
http://cvs.php.net/diff.php/ZendEngine2/zend_API.c?r1=1.250&r2=1.251&ty=u
Index: ZendEngine2/zend_API.c
diff -u ZendEngine2/zend_API.c:1.250 ZendEngine2/zend_API.c:1.251
--- ZendEngine2/zend_API.c:1.250 Sat May 1 16:34:06 2004
+++ ZendEngine2/zend_API.c Wed May 12 19:03:38 2004
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_API.c,v 1.250 2004/05/01 20:34:06 helly Exp $ */
+/* $Id: zend_API.c,v 1.251 2004/05/12 23:03:38 helly Exp $ */
#include "zend.h"
#include "zend_execute.h"
@@ -1161,20 +1161,10 @@
ZEND_API int zend_startup_module(zend_module_entry *module)
{
if (module) {
- int name_len;
- char *lcname;
- TSRMLS_FETCH();
-
- name_len = strlen(module->name);
- lcname = zend_str_tolower_dup(module->name, name_len);
- if (zend_hash_exists(&module_registry, lcname, name_len+1)) {
- efree(lcname);
- zend_error(E_CORE_WARNING, "Module '%s' already loaded", module->name);
- return FAILURE;
- }
- efree(lcname);
module->module_number = zend_next_free_module();
if (module->module_startup_func) {
+ TSRMLS_FETCH();
+
EG(current_module) = module;
if (module->module_startup_func(MODULE_PERSISTENT, module->module_number
TSRMLS_CC)==FAILURE) {
zend_error(E_CORE_ERROR,"Unable to start %s module", module->name);
@@ -1370,26 +1360,17 @@
int retval, name_len;
char *lcname;
TSRMLS_FETCH();
-
+
#if 0
zend_printf("%s: Registering module %d\n", module->name, module->module_number);
#endif
- name_len = strlen(module->name);
- lcname = zend_str_tolower_dup(module->name, name_len);
-
- if (zend_hash_exists(&module_registry, lcname, name_len+1)) {
- efree(lcname);
- zend_error(E_CORE_WARNING, "Module '%s' already loaded", module->name);
- return FAILURE;
- }
-
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);
- efree(lcname);
return FAILURE;
}
module->module_started=1;
-
+ name_len = strlen(module->name);
+ lcname = zend_str_tolower_dup(module->name, name_len);
retval = zend_hash_add(&module_registry, lcname, name_len+1, (void *)module,
sizeof(zend_module_entry), NULL);
efree(lcname);
return retval;