summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2011-08-30 13:00:34 +0800
committerPeng Wu <alexepico@gmail.com>2011-08-30 13:00:57 +0800
commit99c1e74faf22e50e63a7e8055f52cda9f9650061 (patch)
tree2467e3fea001bf9e1b1de2aa9f46db5ed094852e
parent2e4cb2b1fcfe9aa306c69a0ec1ed30136148e2b6 (diff)
downloadlibpinyin-99c1e74faf22e50e63a7e8055f52cda9f9650061.zip
libpinyin-99c1e74faf22e50e63a7e8055f52cda9f9650061.tar.gz
libpinyin-99c1e74faf22e50e63a7e8055f52cda9f9650061.tar.xz
add extern "C"
-rw-r--r--src/pinyin.cpp3
-rw-r--r--src/pinyin.h4
2 files changed, 5 insertions, 2 deletions
diff --git a/src/pinyin.cpp b/src/pinyin.cpp
index b3f4f1b..8eb4640 100644
--- a/src/pinyin.cpp
+++ b/src/pinyin.cpp
@@ -1,7 +1,6 @@
#include "pinyin.h"
-/* Note: will implement a glue layer for input method integration.
- */
+/* a glue layer for input method integration. */
struct _pinyin_context_t{
PinyinCustomSettings m_custom;
diff --git a/src/pinyin.h b/src/pinyin.h
index c4c121d..49b85a2 100644
--- a/src/pinyin.h
+++ b/src/pinyin.h
@@ -43,6 +43,8 @@
using namespace pinyin;
+extern "C" {
+
typedef struct _pinyin_context_t pinyin_context_t;
pinyin_context_t * pinyin_init(const char * systemdir, const char * userdir);
@@ -87,4 +89,6 @@ bool pinyin_train(pinyin_context_t * context);
bool pinyin_save(pinyin_context_t * context);
bool pinyin_reset(pinyin_context_t * context);
+}
+
#endif