Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add m_candidates

  • Loading branch information...
commit 6f79ec094ff8d9e2c3c79737ad74ded27824934a 1 parent 581f0fd
@epico authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/pinyin.cpp
View
4 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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.