summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2013-03-12 13:44:35 +0800
committerPeng Wu <alexepico@gmail.com>2013-03-12 13:44:35 +0800
commit22df46aee568d025e8fb5680bc3c4dc6bfa84829 (patch)
tree08cf472c96210739d9aad2221f19b6f276fe3727
parentd6cd064a253f33263eea56c11d9f1c6b3c6f550d (diff)
downloadlibpinyin-22df46aee568d025e8fb5680bc3c4dc6bfa84829.tar.gz
libpinyin-22df46aee568d025e8fb5680bc3c4dc6bfa84829.tar.xz
libpinyin-22df46aee568d025e8fb5680bc3c4dc6bfa84829.zip
fixes pinyin.h
-rw-r--r--src/pinyin.cpp2
-rw-r--r--src/pinyin.h17
-rw-r--r--tests/test_pinyin.cpp2
3 files changed, 20 insertions, 1 deletions
diff --git a/src/pinyin.cpp b/src/pinyin.cpp
index 56d2ed5..5cac776 100644
--- a/src/pinyin.cpp
+++ b/src/pinyin.cpp
@@ -26,6 +26,8 @@
#include <glib/gstdio.h>
#include "pinyin_internal.h"
+using namespace pinyin;
+
/* a glue layer for input method integration. */
struct _pinyin_context_t{
diff --git a/src/pinyin.h b/src/pinyin.h
index cab13c0..a28b850 100644
--- a/src/pinyin.h
+++ b/src/pinyin.h
@@ -28,7 +28,22 @@
#include "pinyin_custom2.h"
#include "chewing_key.h"
-using namespace pinyin;
+using pinyin::pinyin_option_t;
+using pinyin::DoublePinyinScheme;
+using pinyin::ChewingScheme;
+
+using pinyin::phrase_token_t;
+using pinyin::null_token;
+
+using pinyin::ChewingKey;
+using pinyin::ChewingKeyRest;
+
+using pinyin::TokenVector;
+using pinyin::ChewingKeyVector;
+using pinyin::ChewingKeyRestVector;
+using pinyin::CandidateConstraints;
+using pinyin::MatchResults;
+
extern "C" {
diff --git a/tests/test_pinyin.cpp b/tests/test_pinyin.cpp
index 920963a..e0c3f3e 100644
--- a/tests/test_pinyin.cpp
+++ b/tests/test_pinyin.cpp
@@ -24,6 +24,8 @@
#include <stdlib.h>
#include <string.h>
+using namespace pinyin;
+
int main(int argc, char * argv[]){
pinyin_context_t * context =
pinyin_init("../data", "../data");