dmitry Mon Aug 29 02:51:17 2005 EDT
Modified files:
/php-src/ext/standard string.c
Log:
Fixed gcc 4 compatibility
http://cvs.php.net/diff.php/php-src/ext/standard/string.c?r1=1.474&r2=1.475&ty=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.474 php-src/ext/standard/string.c:1.475
--- php-src/ext/standard/string.c:1.474 Sat Aug 27 15:14:05 2005
+++ php-src/ext/standard/string.c Mon Aug 29 02:51:14 2005
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: string.c,v 1.474 2005/08/27 19:14:05 rolland Exp $ */
+/* $Id: string.c,v 1.475 2005/08/29 06:51:14 dmitry Exp $ */
/* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
@@ -5272,7 +5272,8 @@
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 @@
}
} 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++;
}
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php