/* search method */
int search(int phrase_length, /* in */ ChewingKey keys[],
/* out */ PhraseIndexRanges ranges) const {
+
+ /* clear ranges. */
+ for (size_t i = 0; i < PHRASE_INDEX_LIBRARY_COUNT; ++i) {
+ if (ranges[i])
+ g_array_set_size(ranges[i], 0);
+ }
+
int result = SEARCH_NONE;
if (NULL != m_system_chewing_table)
int search(int phrase_length, /* in */ utf16_t phrase[],
/* out */ phrase_token_t & token){
int result = SEARCH_NONE;
+ token = null_token;
if (NULL != m_system_phrase_table)
result |= m_system_phrase_table->search