summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2017-02-04 15:16:26 +0800
committerPeng Wu <alexepico@gmail.com>2017-02-04 15:16:26 +0800
commit1e698604f33ece6cbd3ee436aa6b9607003f3150 (patch)
tree3c9399f687f990f5b4317155b1f27b85d4890759 /utils
parent58e14c36cdabbd941a2aa9e6d21c76238d08d178 (diff)
downloadlibpinyin-1e698604f33ece6cbd3ee436aa6b9607003f3150.tar.gz
libpinyin-1e698604f33ece6cbd3ee436aa6b9607003f3150.tar.xz
libpinyin-1e698604f33ece6cbd3ee436aa6b9607003f3150.zip
rename MatchResults to MatchResult
Diffstat (limited to 'utils')
-rw-r--r--utils/segment/ngseg.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/utils/segment/ngseg.cpp b/utils/segment/ngseg.cpp
index dcc3c05..32c56f5 100644
--- a/utils/segment/ngseg.cpp
+++ b/utils/segment/ngseg.cpp
@@ -68,11 +68,11 @@ bool deal_with_segmentable(PhraseLookup * phrase_lookup,
GArray * current_ucs4,
FILE * output){
char * result_string = NULL;
- MatchResults results = g_array_new(FALSE, FALSE, sizeof(phrase_token_t));
+ MatchResult result = g_array_new(FALSE, FALSE, sizeof(phrase_token_t));
phrase_lookup->get_best_match(current_ucs4->len,
- (ucs4_t *) current_ucs4->data, results);
+ (ucs4_t *) current_ucs4->data, result);
- phrase_lookup->convert_to_utf8(results, result_string);
+ phrase_lookup->convert_to_utf8(result, result_string);
if (result_string) {
fprintf(output, "%s\n", result_string);
@@ -82,10 +82,10 @@ bool deal_with_segmentable(PhraseLookup * phrase_lookup,
NULL, NULL, NULL);
fprintf(stderr, "Un-segmentable sentence encountered:%s\n",
tmp_string);
- g_array_free(results, TRUE);
+ g_array_free(result, TRUE);
return false;
}
- g_array_free(results, TRUE);
+ g_array_free(result, TRUE);
g_free(result_string);
return true;
}