Hi Lars, On Feb 11, 2008 5:25 PM, Lars Strojny <[EMAIL PROTECTED]> 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 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php