Re: [patch] expose PHP version details as constants
| From: | Pierre Joye | Date: | Mon, 11 Feb 2008 16:42:48 +0000 |
| Subject: | Re: [patch] expose PHP version details as constants | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-35384@lists.php.net to get a copy of this message | ||
Hi Lars,
On Feb 11, 2008 5:25 PM, Lars Strojny <lars@strojny.net> wrote:
> Hi Pierre,
>
> Am Montag, den 11.02.2008, 17:15 +0100 schrieb Pierre Joye:
> [...]
> > I did not see the zend_dirname usage (wrong link?) and did not find
> > either this function/macro.
> >
> > I slightly modified it to avoid too much strlen and to do not process
> > the string if there is nothing to process. Please find my version of
> > your patch as attachment.
>
> I forgot to add the link, I'm so sorry.
> http://lars.schokokeks.org/php/dir-constant-4.diff
Looks better :)
I did not test it but it looks good. Did you run the tests suite?
+ dirname = estrndup(filename, strlen(filename));
+ zend_dirname(dirname, strlen(dirname));
One strlen can be dropped here.
Grüße,
--
Pierre
http://blog.thepimp.net | http://www.libgd.org