summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2013-03-21 10:54:18 +0800
committerPeng Wu <alexepico@gmail.com>2013-03-21 10:54:18 +0800
commit993bcbca62bee26aa3c23bc8edfd6dbe8eb66ad4 (patch)
treee73c6a6b4bd7a04ec591ef59cbdb6987c873bba8
parentd172a790803df6f655e0594ab958544eba6dadad (diff)
downloadlibpinyin-993bcbca62bee26aa3c23bc8edfd6dbe8eb66ad4.tar.gz
libpinyin-993bcbca62bee26aa3c23bc8edfd6dbe8eb66ad4.tar.xz
libpinyin-993bcbca62bee26aa3c23bc8edfd6dbe8eb66ad4.zip
clean up pinyin.h
-rw-r--r--src/pinyin.cpp2
-rw-r--r--src/pinyin.h10
2 files changed, 7 insertions, 5 deletions
diff --git a/src/pinyin.cpp b/src/pinyin.cpp
index b0bef83..35ac171 100644
--- a/src/pinyin.cpp
+++ b/src/pinyin.cpp
@@ -30,6 +30,8 @@ using namespace pinyin;
/* a glue layer for input method integration. */
+typedef GArray * CandidateVector; /* GArray of lookup_candidate_t */
+
struct _pinyin_context_t{
pinyin_option_t m_options;
diff --git a/src/pinyin.h b/src/pinyin.h
index a9ba9e9..d7f57e8 100644
--- a/src/pinyin.h
+++ b/src/pinyin.h
@@ -26,7 +26,11 @@
#include <stdio.h>
#include "novel_types.h"
#include "pinyin_custom2.h"
-#include "chewing_key.h"
+
+namespace pinyin{
+typedef struct _ChewingKey ChewingKey;
+typedef struct _ChewingKeyRest ChewingKeyRest;
+};
using pinyin::pinyin_option_t;
using pinyin::DoublePinyinScheme;
@@ -53,8 +57,6 @@ typedef struct _lookup_candidate_t lookup_candidate_t;
typedef struct _import_iterator_t import_iterator_t;
-typedef GArray * CandidateVector; /* GArray of lookup_candidate_t */
-
enum lookup_candidate_type_t{
BEST_MATCH_CANDIDATE = 1,
NORMAL_CANDIDATE,
@@ -570,8 +572,6 @@ bool pinyin_token_add_unigram_frequency(pinyin_instance_t * instance,
/* hack here. */
typedef ChewingKey PinyinKey;
typedef ChewingKeyRest PinyinKeyPos;
-typedef ChewingKeyVector PinyinKeyVector;
-typedef ChewingKeyRestVector PinyinKeyPosVector;
#define LIBPINYIN_FORMAT_VERSION "0.8.92"