mirror of
https://github.com/php/php-src.git
synced 2026-04-11 18:13:00 +02:00
@Add DIRECTORY_SEPARATOR constant ('/' on UNIX, '\' on Windows) (Stig)
This commit is contained in:
@@ -128,6 +128,7 @@ PHP_RINIT_FUNCTION(dir)
|
||||
|
||||
PHP_MINIT_FUNCTION(dir)
|
||||
{
|
||||
static char tmpstr[2];
|
||||
zend_class_entry dir_class_entry;
|
||||
|
||||
le_dirp = zend_register_list_destructors_ex(_dir_dtor, NULL, "dir", module_number);
|
||||
@@ -138,6 +139,9 @@ PHP_MINIT_FUNCTION(dir)
|
||||
#ifdef ZTS
|
||||
dir_globals_id = ts_allocate_id(sizeof(php_dir_globals), NULL, NULL);
|
||||
#endif
|
||||
tmpstr[0] = DEFAULT_SLASH;
|
||||
tmpstr[1] = '\0';
|
||||
REGISTER_STRING_CONSTANT("DIRECTORY_SEPARATOR", tmpstr, 0);
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user