summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2013-04-10 14:11:22 +0800
committerPeng Wu <alexepico@gmail.com>2013-04-10 14:11:22 +0800
commitd425f10801bc7d593c9464f25c9f84525972caeb (patch)
tree00b38f4e7444a3f044eb3ae690a4b2e3fe98a815 /utils
parentb94e131e6fadf4b83916251e187e30d4433ca1bf (diff)
downloadlibpinyin-d425f10801bc7d593c9464f25c9f84525972caeb.tar.gz
update utils_helper.h
Diffstat (limited to 'utils')
-rw-r--r--utils/utils_helper.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/utils/utils_helper.h b/utils/utils_helper.h
index b0a8737..be4f05f 100644
--- a/utils/utils_helper.h
+++ b/utils/utils_helper.h
@@ -70,10 +70,11 @@
} while(false);
-static bool load_phrase_index(FacadePhraseIndex * phrase_index) {
+static bool load_phrase_index(const pinyin_table_info_t * phrase_files,
+ FacadePhraseIndex * phrase_index) {
MemoryChunk * chunk = NULL;
for (size_t i = 0; i < PHRASE_INDEX_LIBRARY_COUNT; ++i) {
- const pinyin_table_info_t * table_info = pinyin_phrase_files + i;
+ const pinyin_table_info_t * table_info = phrase_files + i;
if (SYSTEM_FILE != table_info->m_file_type)
continue;
@@ -92,10 +93,11 @@ static bool load_phrase_index(FacadePhraseIndex * phrase_index) {
return true;
}
-static bool save_phrase_index(FacadePhraseIndex * phrase_index) {
+static bool save_phrase_index(const pinyin_table_info_t * phrase_files,
+ FacadePhraseIndex * phrase_index) {
MemoryChunk * new_chunk = NULL;
for (size_t i = 0; i < PHRASE_INDEX_LIBRARY_COUNT; ++i) {
- const pinyin_table_info_t * table_info = pinyin_phrase_files + i;
+ const pinyin_table_info_t * table_info = phrase_files + i;
if (SYSTEM_FILE != table_info->m_file_type)
continue;
@@ -115,10 +117,11 @@ static bool save_phrase_index(FacadePhraseIndex * phrase_index) {
return true;
}
-static bool save_dictionary(FacadePhraseIndex * phrase_index) {
+static bool save_dictionary(const pinyin_table_info_t * phrase_files,
+ FacadePhraseIndex * phrase_index) {
MemoryChunk * new_chunk = NULL;
for (size_t i = 0; i < PHRASE_INDEX_LIBRARY_COUNT; ++i) {
- const pinyin_table_info_t * table_info = pinyin_phrase_files + i;
+ const pinyin_table_info_t * table_info = phrase_files + i;
if (DICTIONARY != table_info->m_file_type)
continue;