Permalink
Browse files

add m_candidates

  • Loading branch information...
1 parent 581f0fd commit 6f79ec094ff8d9e2c3c79737ad74ded27824934a @epico committed Mar 21, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/pinyin.cpp
View
@@ -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;
}

0 comments on commit 6f79ec0

Please sign in to comment.