From: Andrei Zmievski Date: Thu, 21 Dec 2006 23:43:52 +0000 (+0000) Subject: Metaphone will work only with binary runtime-encoded strings. X-Git-Tag: RELEASE_1_0_0RC1~560 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c745a2b18c272e3c137fac9e4aca94ec4db3749e;p=php Metaphone will work only with binary runtime-encoded strings. --- diff --git a/ext/standard/metaphone.c b/ext/standard/metaphone.c index 86e96f9a58..0c50957724 100644 --- a/ext/standard/metaphone.c +++ b/ext/standard/metaphone.c @@ -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 @@ PHP_FUNCTION(metaphone) } 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);