diff options
author | foobar <sniper@php.net> | 2005-08-08 16:49:44 +0000 |
---|---|---|
committer | foobar <sniper@php.net> | 2005-08-08 16:49:44 +0000 |
commit | 000a9e30156cd99a7612089dfd1f8799a963132f (patch) | |
tree | 7f3be780cfa2b88bcea9f55fcb7b4227d8d1f642 /ext/standard/dl.c | |
parent | 919b0bd5b44cc2e1572370616592c43d3403e3b7 (diff) | |
download | php-git-000a9e30156cd99a7612089dfd1f8799a963132f.tar.gz |
- Fixed problem with -dextension=foobar.so not having it's MINIT run.
Diffstat (limited to 'ext/standard/dl.c')
-rw-r--r-- | ext/standard/dl.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/standard/dl.c b/ext/standard/dl.c index 2245f4342c..4bff2e5655 100644 --- a/ext/standard/dl.c +++ b/ext/standard/dl.c @@ -84,7 +84,7 @@ PHP_FUNCTION(dl) #endif } - php_dl(*file, MODULE_TEMPORARY, return_value TSRMLS_CC); + php_dl(*file, MODULE_TEMPORARY, return_value, 0 TSRMLS_CC); EG(full_tables_cleanup) = 1; } @@ -101,7 +101,7 @@ PHP_FUNCTION(dl) /* {{{ php_dl */ -void php_dl(zval *file, int type, zval *return_value TSRMLS_DC) +void php_dl(zval *file, int type, zval *return_value, int start_now TSRMLS_DC) { void *handle; char *libpath; @@ -223,12 +223,12 @@ void php_dl(zval *file, int type, zval *return_value TSRMLS_DC) RETURN_FALSE; } - if (type == MODULE_TEMPORARY && zend_startup_module_ex(module_entry TSRMLS_CC) == FAILURE) { + if ((type == MODULE_TEMPORARY || start_now) && zend_startup_module_ex(module_entry TSRMLS_CC) == FAILURE) { DL_UNLOAD(handle); RETURN_FALSE; } - if ((type == MODULE_TEMPORARY) && module_entry->request_startup_func) { + if ((type == MODULE_TEMPORARY || start_now) && module_entry->request_startup_func) { if (module_entry->request_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); @@ -246,7 +246,7 @@ PHP_MINFO_FUNCTION(dl) #else -void php_dl(zval *file, int type, zval *return_value TSRMLS_DC) +void php_dl(zval *file, int type, zval *return_value, int start_now TSRMLS_DC) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot dynamically load %s - dynamic modules are not supported", Z_STRVAL_P(file)); RETURN_FALSE; |