summaryrefslogtreecommitdiffstats
path: root/src/lookup
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2012-02-21 10:41:31 +0800
committerPeng Wu <alexepico@gmail.com>2012-02-21 10:41:31 +0800
commit1ddce5136799a57d5c1fb745a747abdb76c6f9f3 (patch)
tree5ce890cfea6190d82d7f85bd06f55b7fb970a531 /src/lookup
parent285222db4fecdd2f92a54ba48736fee5f604e795 (diff)
downloadlibpinyin-1ddce5136799a57d5c1fb745a747abdb76c6f9f3.tar.gz
libpinyin-1ddce5136799a57d5c1fb745a747abdb76c6f9f3.tar.xz
libpinyin-1ddce5136799a57d5c1fb745a747abdb76c6f9f3.zip
update lookup directory
Diffstat (limited to 'src/lookup')
-rw-r--r--src/lookup/lookup.cpp4
-rw-r--r--src/lookup/phrase_lookup.cpp2
-rw-r--r--src/lookup/phrase_lookup.h4
3 files changed, 5 insertions, 5 deletions
diff --git a/src/lookup/lookup.cpp b/src/lookup/lookup.cpp
index a22c246..9370d5f 100644
--- a/src/lookup/lookup.cpp
+++ b/src/lookup/lookup.cpp
@@ -43,11 +43,11 @@ bool convert_to_utf8(FacadePhraseIndex * phrase_index,
continue;
phrase_index->get_phrase_item(*token, item);
- utf16_t buffer[MAX_PHRASE_LENGTH];
+ ucs4_t buffer[MAX_PHRASE_LENGTH];
item.get_phrase_string(buffer);
guint8 length = item.get_phrase_length();
- gchar * phrase = g_utf16_to_utf8(buffer, length, NULL, NULL, NULL);
+ gchar * phrase = g_ucs4_to_utf8(buffer, length, NULL, NULL, NULL);
char * tmp = result_string;
if ( NULL == result_string )
result_string = g_strdup(phrase);
diff --git a/src/lookup/phrase_lookup.cpp b/src/lookup/phrase_lookup.cpp
index fb96fa4..1abe579 100644
--- a/src/lookup/phrase_lookup.cpp
+++ b/src/lookup/phrase_lookup.cpp
@@ -62,7 +62,7 @@ PhraseLookup::~PhraseLookup(){
g_ptr_array_free(m_steps_content, TRUE);
}
-bool PhraseLookup::get_best_match(int sentence_length, utf16_t sentence[],
+bool PhraseLookup::get_best_match(int sentence_length, ucs4_t sentence[],
MatchResults & results){
m_sentence_length = sentence_length;
m_sentence = sentence;
diff --git a/src/lookup/phrase_lookup.h b/src/lookup/phrase_lookup.h
index a0f0ac2..e1f3ef5 100644
--- a/src/lookup/phrase_lookup.h
+++ b/src/lookup/phrase_lookup.h
@@ -54,7 +54,7 @@ protected:
/* Saved sentence */
int m_sentence_length;
- utf16_t * m_sentence;
+ ucs4_t * m_sentence;
protected:
/* Explicitly search the next phrase,
@@ -78,7 +78,7 @@ public:
~PhraseLookup();
/* Note: this method only accepts the characters in phrase large table. */
- bool get_best_match(int sentence_length, utf16_t sentence[], MatchResults & results);
+ bool get_best_match(int sentence_length, ucs4_t sentence[], MatchResults & results);
/* Note: free the phrase by g_free */
bool convert_to_utf8(MatchResults results,