andrei Thu Dec 21 23:43:52 2006 UTC
Modified files:
/php-src/ext/standard metaphone.c
Log:
Metaphone will work only with binary runtime-encoded strings.
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/metaphone.c?r1=1.32&r2=1.33&diff_format=u
Index: php-src/ext/standard/metaphone.c
diff -u php-src/ext/standard/metaphone.c:1.32
php-src/ext/standard/metaphone.c:1.33
--- php-src/ext/standard/metaphone.c:1.32 Wed Sep 27 08:31:35 2006
+++ php-src/ext/standard/metaphone.c Thu Dec 21 23:43:52 2006
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: metaphone.c,v 1.32 2006/09/27 08:31:35 tony2001 Exp $ */
+/* $Id: metaphone.c,v 1.33 2006/12/21 23:43:52 andrei Exp $ */
/*
Based on CPANs "Text-Metaphone-1.96" by Michael G Schwern <[EMAIL
PROTECTED]>
@@ -27,7 +27,7 @@
static int metaphone(unsigned char *word, int word_len, long max_phonemes,
char **phoned_word, int traditional);
-/* {{{ proto string metaphone(string text[, int phones])
+/* {{{ proto string metaphone(string text[, int phones]) U
Break english phrases down into their phonemes */
PHP_FUNCTION(metaphone)
{
@@ -42,7 +42,7 @@
}
if (metaphone((unsigned char *)str, str_len, phones, &result, 1) == 0) {
- RETVAL_STRING(result, 0);
+ RETVAL_ASCII_STRING(result, ZSTR_AUTOFREE);
} else {
if (result) {
efree(result);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php