summaryrefslogtreecommitdiffstats
path: root/src/storage
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2011-11-09 10:33:22 +0800
committerPeng Wu <alexepico@gmail.com>2011-11-09 10:33:22 +0800
commit4fbe19e5eaeb4d1bdb509daafeedbf923438b1b7 (patch)
tree9a7e81b11b467a05c95e2df9a388f49deba3171c /src/storage
parentc389ac98652ac83bb3bbc16368fee799df3aef29 (diff)
downloadlibpinyin-4fbe19e5eaeb4d1bdb509daafeedbf923438b1b7.tar.gz
libpinyin-4fbe19e5eaeb4d1bdb509daafeedbf923438b1b7.tar.xz
libpinyin-4fbe19e5eaeb4d1bdb509daafeedbf923438b1b7.zip
fixes pinyin parser table compile
Diffstat (limited to 'src/storage')
-rw-r--r--src/storage/chewing_key.h10
-rw-r--r--src/storage/pinyin_parser2.cpp1
-rw-r--r--src/storage/pinyin_parser2.h3
3 files changed, 14 insertions, 0 deletions
diff --git a/src/storage/chewing_key.h b/src/storage/chewing_key.h
index 970ed72..8234a4f 100644
--- a/src/storage/chewing_key.h
+++ b/src/storage/chewing_key.h
@@ -22,6 +22,8 @@
#ifndef CHEWING_KEY_H
#define CHEWING_KEY_H
+#include <glib.h>
+
/** @file chewing_key.h
* @brief the definitions of chewing key related classes and structs.
*/
@@ -137,6 +139,14 @@ struct ChewingKey
m_final = CHEWING_ZERO_FINAL;
m_tone = CHEWING_ZERO_TONE;
}
+
+ ChewingKey(ChewingInitial initial, ChewingMiddle middle,
+ ChewingFinal final) {
+ m_initial = initial;
+ m_middle = middle;
+ m_final = final;
+ m_tone = CHEWING_ZERO_TONE;
+ }
};
struct ChewingKeyRest
diff --git a/src/storage/pinyin_parser2.cpp b/src/storage/pinyin_parser2.cpp
index 7553ef6..0d68235 100644
--- a/src/storage/pinyin_parser2.cpp
+++ b/src/storage/pinyin_parser2.cpp
@@ -21,4 +21,5 @@
#include "pinyin_custom2.h"
#include "chewing_key.h"
+#include "pinyin_parser2.h"
#include "pinyin_parser_table.h"
diff --git a/src/storage/pinyin_parser2.h b/src/storage/pinyin_parser2.h
index e2c09a8..c2702cd 100644
--- a/src/storage/pinyin_parser2.h
+++ b/src/storage/pinyin_parser2.h
@@ -24,6 +24,8 @@
#include "chewing_key.h"
+namespace pinyin{
+
typedef struct {
const char * m_pinyin_str;
const char * m_chewing_str;
@@ -57,4 +59,5 @@ typedef struct {
gfloat m_benefit;
} resplit_table_item_t;
+};
#endif