From c745a2b18c272e3c137fac9e4aca94ec4db3749e Mon Sep 17 00:00:00 2001 From: Andrei Zmievski Date: Thu, 21 Dec 2006 23:43:52 +0000 Subject: [PATCH] Metaphone will work only with binary runtime-encoded strings. --- ext/standard/metaphone.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); -- 2.40.0