diff options
author | Peng Wu <alexepico@gmail.com> | 2013-03-21 10:10:11 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2013-03-21 10:10:11 +0800 |
commit | 6f79ec094ff8d9e2c3c79737ad74ded27824934a (patch) | |
tree | e71b479e3d6d3d4bfedb69eed5bec7bece572eaf | |
parent | 581f0fd06f62791d5c2e31b4a8c7b1f07a82d313 (diff) | |
download | libpinyin-6f79ec094ff8d9e2c3c79737ad74ded27824934a.tar.gz libpinyin-6f79ec094ff8d9e2c3c79737ad74ded27824934a.tar.xz libpinyin-6f79ec094ff8d9e2c3c79737ad74ded27824934a.zip |
add m_candidates
-rw-r--r-- | src/pinyin.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pinyin.cpp b/src/pinyin.cpp index 6d6ff84..3894b30 100644 --- a/src/pinyin.cpp +++ b/src/pinyin.cpp @@ -698,6 +698,8 @@ pinyin_instance_t * pinyin_alloc_instance(pinyin_context_t * context){ (TRUE, FALSE, sizeof(lookup_constraint_t)); instance->m_match_results = g_array_new(FALSE, FALSE, sizeof(phrase_token_t)); + instance->m_candidates = + g_array_new(FALSE, FALSE, sizeof(lookup_candidate_t)); return instance; } @@ -709,6 +711,7 @@ void pinyin_free_instance(pinyin_instance_t * instance){ g_array_free(instance->m_pinyin_key_rests, TRUE); g_array_free(instance->m_constraints, TRUE); g_array_free(instance->m_match_results, TRUE); + g_array_free(instance->m_candidates, TRUE); delete instance; } @@ -1791,6 +1794,7 @@ bool pinyin_reset(pinyin_instance_t * instance){ g_array_set_size(instance->m_pinyin_key_rests, 0); g_array_set_size(instance->m_constraints, 0); g_array_set_size(instance->m_match_results, 0); + g_array_set_size(instance->m_candidates, 0); return true; } |