Re: [PHP-DEV] [PATCH] unix path separators in spl

2008-07-23 Thread Marcus Boerger
Hello Steph, Wednesday, July 23, 2008, 10:24:35 PM, you wrote: > Hi Marcus, >> how about having this as an option inside the SPL classes that gets >> turned on by Phar automatically? Inside SPL we could have it as a user >> set-only flag. > The attached patch does this, at the SPL end. Can I c

Re: [PHP-DEV] [PATCH] unix path separators in spl

2008-07-23 Thread Steph Fox
Hi Marcus, how about having this as an option inside the SPL classes that gets turned on by Phar automatically? Inside SPL we could have it as a user set-only flag. The attached patch does this, at the SPL end. Can I commit it (or something very close) before the 5_3 freeze please? NB The

Re: [PHP-DEV] [PATCH] unix path separators in spl

2008-06-19 Thread Stanislav Malyshev
Hi! Fair point. I like Marcus' idea tho'. As long as the default stays the same and doesn't hurt anybody not touching the option - go for it. -- Stanislav Malyshev, Zend Software Architect [EMAIL PROTECTED] http://www.zend.com/ (408)253-8829 MSN: [EMAIL PROTECTED] -- PHP Internals - PHP

Re: [PHP-DEV] [PATCH] unix path separators in spl

2008-06-19 Thread Steph Fox
Hi Stas, Doesn't PATH_SEPARATOR use DEFAULT_SLASH? Should be DIRECTORY_SEPARATOR Bleh, must be nearly switching-off time and it's "\" on windows (PATH_SEPARATOR is ";" ). Do you propose to change it to "/"? dirsep_str[0] = DEFAULT_SLASH; dirsep_str[1] = '\0'; REGISTER_STRING_CONSTANT("D

Re: [PHP-DEV] [PATCH] unix path separators in spl

2008-06-19 Thread Steph Fox
Hi Marcus, how about having this as an option inside the SPL classes that gets turned on by Phar automatically? Inside SPL we could have it as a user set-only flag. You are brilliant. I owe you a beer :) - Steph -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit:

Re: [PHP-DEV] [PATCH] unix path separators in spl

2008-06-19 Thread Marcus Boerger
Hello Steph, how about having this as an option inside the SPL classes that gets turned on by Phar automatically? Inside SPL we could have it as a user set-only flag. marcus Wednesday, June 18, 2008, 10:28:40 PM, you wrote: > Index: ext/spl/spl_directory.c > ==

Re: [PHP-DEV] [PATCH] unix path separators in spl

2008-06-19 Thread Stanislav Malyshev
Hi! Windows even if my application was written in most generic way. Do I miss something? Doesn't PATH_SEPARATOR use DEFAULT_SLASH? Should be DIRECTORY_SEPARATOR and it's "\" on windows (PATH_SEPARATOR is ";" ). Do you propose to change it to "/"? Path comparison is important. I thought

Re: [PHP-DEV] [PATCH] unix path separators in spl

2008-06-19 Thread Steph Fox
The attached patch implements spl_unixify_path_separators(). If it's I'm afraid that automatically applying slash conversions to all results returned by SPL file functions - if that's what this patch does - may be unwanted. This way SPL functions and regular file functions would return diff

Re: [PHP-DEV] [PATCH] unix path separators in spl

2008-06-19 Thread Steph Fox
Any amount, but I don't see why it would break only windows-specific code. If I use any other function to get filenames, and/or use PATH_SEPARATOR to compose names, and then use these names in the same context as those converting SPL function, I'd get different names on Windows even if my app

Re: [PHP-DEV] [PATCH] unix path separators in spl

2008-06-19 Thread Stanislav Malyshev
Hi! On the other hand, the only code likely to be broken would be platform-specific code written for Windows boxes - how much of that is likely to be out there? Another point is that, although Windows *writes* Any amount, but I don't see why it would break only windows-specific code. If I u

Re: [PHP-DEV] [PATCH] unix path separators in spl

2008-06-19 Thread Stanislav Malyshev
Hi! The attached patch implements spl_unixify_path_separators(). If it's I'm afraid that automatically applying slash conversions to all results returned by SPL file functions - if that's what this patch does - may be unwanted. This way SPL functions and regular file functions would return

[PHP-DEV] [PATCH] unix path separators in spl

2008-06-18 Thread Steph Fox
Hi all, In Phar we have an internal Windows-only function named phar_unixify_path_separators(), which is needed because Phar is intended to be used with web apps. Phar inherits from SPL, which currently uses the system-specific DEFAULT_SLASH when returning directory paths. This isn't actuall