Re: [PHP-DEV] patch: remove unneeded strlen() check from php_addcslashes

2006-12-13 Thread Ilia Alshanetsky
Nevermind the previous e-mail, I see that strlen() is already done inside safe_emalloc(), patch was applied, thanks. Ilia -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] patch: remove unneeded strlen() check from php_addcslashes

2006-12-13 Thread Ilia Alshanetsky
This code is a fallback in instances where length is not know, which is something that may happen. Given that this is an API function I don't think we can make this change as it may break out-of-php code that relies on this functionality. I really don't think you'll see any visible gain by

[PHP-DEV] patch: remove unneeded strlen() check from php_addcslashes

2006-12-12 Thread Ron Korving
Hi, The strlen() check on line 4730 of ext/standard/string.c is pointless because of the length assignment in line 4720. Below is a patch (against latest 5.2) to remove them. Regards, Ron Korving Index: ext/standard/string.c ===