cvs: php-src /ext/standard metaphone.c

From: Date: Thu, 21 Dec 2006 23:43:52 +0000
Subject: cvs: php-src /ext/standard metaphone.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-42294@lists.php.net to get a copy of this message
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 <schwern@pobox.com> @@ -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);

« previous php.cvs (#42294) next »