mirror of
https://github.com/php/php-src.git
synced 2024-11-26 11:23:47 +08:00
Drop slower strchr in favor of memchr.
This commit is contained in:
parent
c693ca137f
commit
4a658e8b51
@ -249,7 +249,7 @@ PS_SERIALIZER_DECODE_FUNC(php)
|
||||
int has_value;
|
||||
|
||||
current = (zval *) ecalloc(sizeof(zval), 1);
|
||||
for (p = q = val; (p < endptr) && (q = strchr(p, '|')); p = q) {
|
||||
for (p = q = val; (p < endptr) && (q = memchr(p, '|', endptr - p)); p = q) {
|
||||
if (p[0] == '!') {
|
||||
p++;
|
||||
has_value = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user