diff options
author | Zeev Suraski <zeev@php.net> | 2000-06-29 21:51:40 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 2000-06-29 21:51:40 +0000 |
commit | 7fb72c172608af3ced3b14ea98c279656b856c56 (patch) | |
tree | 4b9dfe8050bb79283a5ec51cb84e8129cf7f009f | |
parent | 4e5597e0618ee3f834cf3d020b56af4ac8c85cb4 (diff) | |
download | php-git-7fb72c172608af3ced3b14ea98c279656b856c56.tar.gz |
Fixed opendir() thoroughly
-rw-r--r-- | NEWS | 6 | ||||
-rw-r--r-- | ext/standard/basic_functions.c | 1 | ||||
-rw-r--r-- | ext/standard/dir.c | 9 | ||||
-rw-r--r-- | ext/standard/php_dir.h | 3 |
4 files changed, 14 insertions, 5 deletions
@@ -2,6 +2,12 @@ PHP 4.0 NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? 2000, Version 4.0.2 +- Fixed opendir() again. It should actually work well continuously now (Zeev) +- Added three additional arguments to be sent to a user-defined error handler - + the filename and line number in which the error occured, and the context + (the local variables) of the error (Zeev, Zend Engine) +- Improved the error handling code to handle an error in a user-defined error + handling function (Zeev, Zend Engine) - Added an optional parameter to preg_replace() that can be used to specify how many replacements to make. (Andrei) diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 91ce4a2de3..d332e4b64e 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -725,6 +725,7 @@ PHP_RINIT_FUNCTION(basic) PHP_RINIT(filestat)(INIT_FUNC_ARGS_PASSTHRU); PHP_RINIT(syslog)(INIT_FUNC_ARGS_PASSTHRU); PHP_RINIT(assert)(INIT_FUNC_ARGS_PASSTHRU); + PHP_RINIT(dir)(INIT_FUNC_ARGS_PASSTHRU); return SUCCESS; } diff --git a/ext/standard/dir.c b/ext/standard/dir.c index c2e9a98822..32674b696f 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -113,9 +113,12 @@ static void _dir_dtor(php_dir *dirp) efree(dirp); } -static void php_dir_init_globals(DIRLS_D) +PHP_RINIT_FUNCTION(dir) { + DIRLS_FETCH(); + DIRG(default_dir) = -1; + return SUCCESS; } PHP_MINIT_FUNCTION(dir) @@ -128,9 +131,7 @@ PHP_MINIT_FUNCTION(dir) dir_class_entry_ptr = zend_register_internal_class(&dir_class_entry); #ifdef ZTS - dir_globals_id = ts_allocate_id(sizeof(php_dir_globals), (ts_allocate_ctor) php_dir_init_globals, NULL); -#else - php_dir_init_globals(DIRLS_C); + dir_globals_id = ts_allocate_id(sizeof(php_dir_globals), NULL, NULL); #endif return SUCCESS; diff --git a/ext/standard/php_dir.h b/ext/standard/php_dir.h index 5d636edc1e..566a97c713 100644 --- a/ext/standard/php_dir.h +++ b/ext/standard/php_dir.h @@ -23,7 +23,8 @@ #define _PHP_DIR_H /* directory functions */ -extern PHP_MINIT_FUNCTION(dir); +PHP_MINIT_FUNCTION(dir); +PHP_RINIT_FUNCTION(dir); PHP_FUNCTION(opendir); PHP_FUNCTION(closedir); PHP_FUNCTION(chdir); |