Re: cvs: spl / spl_functions.c
| From: | Sascha Schumann | Date: | Sat, 24 May 2003 16:02:26 +0000 |
| Subject: | Re: cvs: spl / spl_functions.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-21245@lists.php.net to get a copy of this message | ||
On Sat, 24 May 2003, Marcus Boerger wrote:
> helly Sat May 24 11:51:24 2003 EDT
>
> Modified files:
> /spl spl_functions.c
> Log:
> fix error resulting from strlen() -> sizeof() change in engine macros
I 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.
- Sascha