Permalink
Browse files

update test_phrase.cpp

  • Loading branch information...
1 parent 4348b63 commit 60d7294cce9c5f57e3497765783b9fa65e7ff9c0 @epico committed Mar 21, 2013
Showing with 5 additions and 4 deletions.
  1. +5 −4 tests/test_phrase.cpp
View
@@ -42,11 +42,12 @@ int main(int argc, char * argv[]){
break;
pinyin_phrase_segment(instance, linebuf);
- MatchResults & tokens = instance->m_match_results;
+ guint len = 0;
+ pinyin_get_n_phrase(instance, &len);
- for ( size_t i = 0; i < tokens->len; ++i ){
- phrase_token_t token = g_array_index
- (tokens, phrase_token_t, i);
+ for ( size_t i = 0; i < len; ++i ){
+ phrase_token_t token = null_token;
+ pinyin_get_phrase_token(instance, i, &token);
if ( null_token == token )
continue;

0 comments on commit 60d7294

Please sign in to comment.