From 7c540af4894471116aadfed6a0b92d344938c1f0 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Thu, 13 Mar 2014 14:29:42 +0800 Subject: extend zhuyin_in_chewing_keyboard function --- src/storage/pinyin_parser2.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/storage/pinyin_parser2.cpp') diff --git a/src/storage/pinyin_parser2.cpp b/src/storage/pinyin_parser2.cpp index ac0f659..32cee92 100644 --- a/src/storage/pinyin_parser2.cpp +++ b/src/storage/pinyin_parser2.cpp @@ -671,8 +671,12 @@ int ChewingDiscreteParser2::parse(pinyin_option_t options, int maximum_len = 0; int i; /* probe the longest possible chewing string. */ for (i = 0; i < len; ++i) { - if (!in_chewing_scheme(options, str[i], NULL)) + gchar ** symbols = NULL; + if (!in_chewing_scheme(options, str[i], symbols)) { + g_strfreev(symbols); break; + } + g_strfreev(symbols); } maximum_len = i; @@ -1008,8 +1012,12 @@ int ChewingDaChenCP26Parser2::parse(pinyin_option_t options, int maximum_len = 0; int i; /* probe the longest possible chewing string. */ for (i = 0; i < len; ++i) { - if (!in_chewing_scheme(options, str[i], NULL)) + gchar ** symbols = NULL; + if (!in_chewing_scheme(options, str[i], symbols)) { + g_strfreev(symbols); break; + } + g_strfreev(symbols); } maximum_len = i; -- cgit