summaryrefslogtreecommitdiffstats
path: root/src/storage/pinyin_parser2.cpp
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2014-03-13 14:29:42 +0800
committerPeng Wu <alexepico@gmail.com>2014-03-13 14:29:42 +0800
commit7c540af4894471116aadfed6a0b92d344938c1f0 (patch)
tree0b1786217a97d756f7053bc8087e5e0c5f5644c9 /src/storage/pinyin_parser2.cpp
parentfb3a4831ffc38392cf0a821134604035db259fa6 (diff)
downloadlibzhuyin-7c540af4894471116aadfed6a0b92d344938c1f0.tar.gz
libzhuyin-7c540af4894471116aadfed6a0b92d344938c1f0.tar.xz
libzhuyin-7c540af4894471116aadfed6a0b92d344938c1f0.zip
extend zhuyin_in_chewing_keyboard function
Diffstat (limited to 'src/storage/pinyin_parser2.cpp')
-rw-r--r--src/storage/pinyin_parser2.cpp12
1 files changed, 10 insertions, 2 deletions
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;