mirror of
https://github.com/php/php-src.git
synced 2024-09-24 11:27:28 +00:00
Fixed gcc 4 compatibility
This commit is contained in:
parent
7c8af3ec49
commit
a3b7eb2284
@ -5272,7 +5272,8 @@ PHP_FUNCTION(substr_count)
|
||||
|
||||
if (haystack_type == IS_UNICODE) {
|
||||
while ((p = zend_u_memnstr((UChar *)p, (UChar *)needle, needle_len, (UChar *)endp)) != NULL) {
|
||||
(UChar *)p += needle_len;
|
||||
/*(UChar *)p += needle_len; // GCC 4.0.0 cannot compile this */
|
||||
p += UBYTES(needle_len);
|
||||
count++;
|
||||
}
|
||||
} else {
|
||||
@ -5284,7 +5285,8 @@ PHP_FUNCTION(substr_count)
|
||||
}
|
||||
} else {
|
||||
while ((p = php_memnstr((char *)p, (char *)needle, needle_len, (char *)endp))) {
|
||||
(char *)p += needle_len;
|
||||
/*(char *)p += needle_len; // GCC 4.0.0 cannot compile this */
|
||||
p += needle_len;
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user