Re: cvs: spl / spl_functions.c
| From: | Andi Gutmans | Date: | Sun, 25 May 2003 19:52:41 +0000 |
| Subject: | Re: cvs: spl / spl_functions.c | ||
| References: | 1 2 3 4 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-21260@lists.php.net to get a copy of this message | ||
At 09:48 PM 5/25/2003 +0200, Sascha Schumann wrote:
On Sun, 25 May 2003, Andi Gutmans wrote: At 06:02 PM 5/24/2003 +0200, Sascha Schumann wrote:Yep, you're right. AndiOn Sat, 24 May 2003, Marcus Boerger wrote:That would break on fast_str_len("abc"), no?helly Sat May 24 11:51:24 2003 EDTModified files:/spl spl_functions.cLog: fix error resulting from strlen() -> sizeof() change in engine macrosI have not followed the changes, but this might be a good idea:#define fast_str_len(x) \ (sizeof(x) == sizeof(void *) ? strlen(x) : sizeof(x)-1)I.e. if x looks like a pointer, invoke the regular strlen. The check will be optimized away by the compiler.No, it would just return strlen("abc").