wez Tue May 18 11:26:32 2004 EDT
Modified files:
/php-src/ext/standard dl.c
Log:
Fix dl() and extension=
http://cvs.php.net/diff.php/php-src/ext/standard/dl.c?r1=1.89&r2=1.90&ty=u
Index: php-src/ext/standard/dl.c
diff -u php-src/ext/standard/dl.c:1.89 php-src/ext/standard/dl.c:1.90
--- php-src/ext/standard/dl.c:1.89 Sat May 1 16:34:15 2004
+++ php-src/ext/standard/dl.c Tue May 18 11:26:32 2004
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dl.c,v 1.89 2004/05/01 20:34:15 helly Exp $ */
+/* $Id: dl.c,v 1.90 2004/05/18 15:26:32 wez Exp $ */
#include "php.h"
#include "dl.h"
@@ -108,8 +108,6 @@
zend_module_entry *(*get_module)(void);
int error_type;
char *extension_dir;
- int name_len;
- char *lcname;
if (type==MODULE_PERSISTENT) {
/* Use the configuration hash directly, the INI mechanism is not yet
initialized */
@@ -236,25 +234,9 @@
DL_UNLOAD(handle);
RETURN_FALSE;
}
- name_len = strlen(module_entry->name);
- lcname = zend_str_tolower_dup(module_entry->name, name_len);
- if (zend_hash_exists(&module_registry, lcname, name_len+1)) {
- efree(lcname);
- php_error_docref(NULL TSRMLS_CC, error_type, "Module '%s' already
loaded", module_entry->name);
- DL_UNLOAD(handle);
- RETURN_FALSE;
- }
- efree(lcname);
Z_TYPE_P(module_entry) = type;
module_entry->module_number = zend_next_free_module();
- if (module_entry->module_startup_func) {
- if (module_entry->module_startup_func(type,
module_entry->module_number TSRMLS_CC)==FAILURE) {
- php_error_docref(NULL TSRMLS_CC, error_type, "Unable to
initialize module '%s'", module_entry->name);
- DL_UNLOAD(handle);
- RETURN_FALSE;
- }
- }
- zend_register_module(module_entry);
+ zend_register_module_ex(module_entry TSRMLS_CC);
if ((type == MODULE_TEMPORARY) && module_entry->request_startup_func) {
if (module_entry->request_startup_func(type,
module_entry->module_number TSRMLS_CC)) {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php