summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2020-07-24 15:04:25 +0800
committerPeng Wu <alexepico@gmail.com>2020-07-24 15:04:25 +0800
commit958b212c3ac1750950b050442ec7320ff7a7d1bf (patch)
tree35c7693809e42c89b70e2e4c5017759e0baad595
parentc3063e071bf6a7888ddccdd75b361dbab2386f5e (diff)
downloadlibpinyin-devel.zip
libpinyin-devel.tar.gz
libpinyin-devel.tar.xz
update pinyin.cpp and zhuyin.cppdevel
-rw-r--r--src/pinyin.cpp9
-rw-r--r--src/zhuyin.cpp6
2 files changed, 10 insertions, 5 deletions
diff --git a/src/pinyin.cpp b/src/pinyin.cpp
index 75eb41b..5381fdf 100644
--- a/src/pinyin.cpp
+++ b/src/pinyin.cpp
@@ -1208,9 +1208,10 @@ bool pinyin_parse_full_pinyin(pinyin_instance_t * instance,
pinyin_context_t * & context = instance->m_context;
pinyin_option_t options = context->m_options;
+ gint16 distance = 0;
int pinyin_len = strlen(onepinyin);
bool retval = context->m_full_pinyin_parser->parse_one_key
- (options, *onekey, onepinyin, pinyin_len);
+ (options, *onekey, distance, onepinyin, pinyin_len);
return retval;
}
@@ -1249,9 +1250,10 @@ bool pinyin_parse_double_pinyin(pinyin_instance_t * instance,
pinyin_context_t * & context = instance->m_context;
pinyin_option_t options = context->m_options;
+ gint16 distance = 0;
int pinyin_len = strlen(onepinyin);
bool retval = context->m_double_pinyin_parser->parse_one_key
- (options, *onekey, onepinyin, pinyin_len);
+ (options, *onekey, distance, onepinyin, pinyin_len);
return retval;
}
@@ -1289,9 +1291,10 @@ bool pinyin_parse_chewing(pinyin_instance_t * instance,
/* disable the zhuyin correction options. */
options &= ~ZHUYIN_CORRECT_ALL;
+ gint16 distance = 0;
int chewing_len = strlen(onechewing);
bool retval = context->m_chewing_parser->parse_one_key
- (options, *onekey, onechewing, chewing_len );
+ (options, *onekey, distance, onechewing, chewing_len );
return retval;
}
diff --git a/src/zhuyin.cpp b/src/zhuyin.cpp
index cb3ce70..1b9cda5 100644
--- a/src/zhuyin.cpp
+++ b/src/zhuyin.cpp
@@ -1007,9 +1007,10 @@ bool zhuyin_parse_full_pinyin(zhuyin_instance_t * instance,
/* disable the pinyin correction options. */
options &= ~PINYIN_CORRECT_ALL;
+ gint16 distance = 0;
int pinyin_len = strlen(onepinyin);
bool retval = context->m_full_pinyin_parser->parse_one_key
- (options, *onekey, onepinyin, pinyin_len);
+ (options, *onekey, distance, onepinyin, pinyin_len);
return retval;
}
@@ -1047,9 +1048,10 @@ bool zhuyin_parse_chewing(zhuyin_instance_t * instance,
zhuyin_context_t * & context = instance->m_context;
zhuyin_option_t options = context->m_options;
+ gint16 distance = 0;
int chewing_len = strlen(onechewing);
bool retval = context->m_chewing_parser->parse_one_key
- (options, *onekey, onechewing, chewing_len );
+ (options, *onekey, distance, onechewing, chewing_len);
return retval;
}