summaryrefslogtreecommitdiffstats
path: root/src/pinyin.cpp
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2012-12-05 11:05:05 +0800
committerPeng Wu <alexepico@gmail.com>2012-12-05 11:05:05 +0800
commita772331638cce1d581da85fd3300fb00ba1acd2a (patch)
tree439dff86e98933c0eb3539f520e5857b04e4e3b2 /src/pinyin.cpp
parent2e0f37b400572b6ed9938229802efd47902f7985 (diff)
downloadlibpinyin-a772331638cce1d581da85fd3300fb00ba1acd2a.tar.gz
libpinyin-a772331638cce1d581da85fd3300fb00ba1acd2a.tar.xz
libpinyin-a772331638cce1d581da85fd3300fb00ba1acd2a.zip
remove pinyin_translate_token
Diffstat (limited to 'src/pinyin.cpp')
-rw-r--r--src/pinyin.cpp14
1 files changed, 0 insertions, 14 deletions
diff --git a/src/pinyin.cpp b/src/pinyin.cpp
index 13377ad..9f886ea 100644
--- a/src/pinyin.cpp
+++ b/src/pinyin.cpp
@@ -1709,20 +1709,6 @@ bool pinyin_lookup_tokens(pinyin_instance_t * instance,
return SEARCH_OK & retval;
}
-/* the returned word should be freed by g_free. */
-bool pinyin_translate_token(pinyin_instance_t * instance,
- phrase_token_t token, char ** word){
- pinyin_context_t * & context = instance->m_context;
- PhraseItem item;
- ucs4_t buffer[MAX_PHRASE_LENGTH];
-
- int retval = context->m_phrase_index->get_phrase_item(token, item);
- item.get_phrase_string(buffer);
- guint8 length = item.get_phrase_length();
- *word = g_ucs4_to_utf8(buffer, length, NULL, NULL, NULL);
- return ERROR_OK == retval;
-}
-
bool pinyin_get_pinyins_from_token(pinyin_instance_t * instance,
phrase_token_t token, GArray * pinyinkeys){
pinyin_context_t * & context = instance->m_context;