[PHP-CVS] cvs: php-src(PHP_5_3) /ext/intl/tests grapheme.phpt

2009-04-27 Thread Kirti Velankar
kirtig  Mon Apr 27 18:17:39 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/intl/tests grapheme.phpt 
  Log:
  Fix in grapheme_extract
  
http://cvs.php.net/viewvc.cgi/php-src/ext/intl/tests/grapheme.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/intl/tests/grapheme.phpt
diff -u php-src/ext/intl/tests/grapheme.phpt:1.1.2.2 
php-src/ext/intl/tests/grapheme.phpt:1.1.2.3
--- php-src/ext/intl/tests/grapheme.phpt:1.1.2.2Fri Apr 10 16:53:35 2009
+++ php-src/ext/intl/tests/grapheme.phptMon Apr 27 18:17:39 2009
@@ -560,7 +560,7 @@
array( abc, 1, 1, 2, b ),
array( abc, 1, 2, 3, c ),
array( abc, 0, 2, 2,  ),
-
+array( http://news.bbc.co.uk/2/hi/middle_east/7831588.stm;, 48, 48 , 
50 , tm ),
 
array( $char_a_ring_nfd . bc, 3, $char_a_ring_nfd . bc ),
array( $char_a_ring_nfd . bc, 2, $char_a_ring_nfd . b ),
@@ -1095,6 +1095,7 @@
 extract from abc 1 graphemes - grapheme_extract starting at byte position 
1 with $next = b == b $next=2 == 2 
 extract from abc 1 graphemes - grapheme_extract starting at byte position 
2 with $next = c == c $next=3 == 3 
 extract from abc 0 graphemes - grapheme_extract starting at byte position 
2 with $next =  ==  $next=2 == 2 
+extract from 
http%3A%2F%2Fnews.bbc.co.uk%2F2%2Fhi%2Fmiddle_east%2F7831588.stm 48 
graphemes - grapheme_extract starting at byte position 48 with $next = tm == tm 
$next=50 == 50 
 extract from a%CC%8Abc 3 graphemes - grapheme_extract = a%CC%8Abc == 
a%CC%8Abc
 extract from a%CC%8Abc 2 graphemes - grapheme_extract = a%CC%8Ab == 
a%CC%8Ab
 extract from a%CC%8Abc 1 graphemes - grapheme_extract = a%CC%8A == a%CC%8A



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/intl/grapheme grapheme_string.c

2009-04-27 Thread Kirti Velankar
kirtig  Mon Apr 27 18:18:04 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/intl/grapheme  grapheme_string.c 
  Log:
  Fix in grapheme_extract
  
http://cvs.php.net/viewvc.cgi/php-src/ext/intl/grapheme/grapheme_string.c?r1=1.1.2.3r2=1.1.2.4diff_format=u
Index: php-src/ext/intl/grapheme/grapheme_string.c
diff -u php-src/ext/intl/grapheme/grapheme_string.c:1.1.2.3 
php-src/ext/intl/grapheme/grapheme_string.c:1.1.2.4
--- php-src/ext/intl/grapheme/grapheme_string.c:1.1.2.3 Fri Apr 10 16:53:35 2009
+++ php-src/ext/intl/grapheme/grapheme_string.c Mon Apr 27 18:18:04 2009
@@ -852,10 +852,11 @@
 */

if ( -1 != grapheme_ascii_check(pstr, size + 1  str_len ? size + 1 : 
str_len ) ) {
+long nsize = ( size  str_len ? size : str_len ); 
if ( NULL != next ) {
-   ZVAL_LONG(next, start+size);
+   ZVAL_LONG(next, start+nsize);
}
-   RETURN_STRINGL(((char *)pstr), size, 1);
+   RETURN_STRINGL(((char *)pstr), nsize, 1);
}
 
/* convert the strings to UTF-16. */



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php