diff options
author | Peng Wu <alexepico@gmail.com> | 2013-03-22 11:06:55 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2013-03-22 11:06:55 +0800 |
commit | 2cc2dadc6bf0149f1a0ed386880e3fb4262e3b67 (patch) | |
tree | eeae3a546ef83e79010f03a7fdc5f09cd1013f94 /src | |
parent | 60d7294cce9c5f57e3497765783b9fa65e7ff9c0 (diff) | |
download | libpinyin-2cc2dadc6bf0149f1a0ed386880e3fb4262e3b67.tar.gz libpinyin-2cc2dadc6bf0149f1a0ed386880e3fb4262e3b67.tar.xz libpinyin-2cc2dadc6bf0149f1a0ed386880e3fb4262e3b67.zip |
use G_BEGIN/END_DECLS
Diffstat (limited to 'src')
-rw-r--r-- | src/include/novel_types.h | 6 | ||||
-rw-r--r-- | src/pinyin.h | 20 | ||||
-rw-r--r-- | src/storage/chewing_key.h | 8 | ||||
-rw-r--r-- | src/storage/pinyin_custom2.h | 6 |
4 files changed, 15 insertions, 25 deletions
diff --git a/src/include/novel_types.h b/src/include/novel_types.h index 3011012..088d552 100644 --- a/src/include/novel_types.h +++ b/src/include/novel_types.h @@ -29,7 +29,7 @@ #include <glib.h> -namespace pinyin{ +G_BEGIN_DECLS typedef guint32 phrase_token_t; typedef gunichar ucs4_t; @@ -61,10 +61,10 @@ typedef GArray * PhraseIndexRanges[PHRASE_INDEX_LIBRARY_COUNT]; /* Array of Token */ typedef GArray * PhraseTokens[PHRASE_INDEX_LIBRARY_COUNT]; + /* * PinYin Table Definition */ -class MemoryChunk; /* For both PinYin Table and Phrase Table */ @@ -163,6 +163,6 @@ typedef enum { #define LAMBDA_PARAMETER 0.347121 -}; +G_END_DECLS #endif diff --git a/src/pinyin.h b/src/pinyin.h index 3a9a16e..6002315 100644 --- a/src/pinyin.h +++ b/src/pinyin.h @@ -27,24 +27,10 @@ #include "novel_types.h" #include "pinyin_custom2.h" -namespace pinyin{ +G_BEGIN_DECLS + typedef struct _ChewingKey ChewingKey; typedef struct _ChewingKeyRest ChewingKeyRest; -}; - -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::ChewingKeyVector; - - -extern "C" { typedef struct _pinyin_context_t pinyin_context_t; typedef struct _pinyin_instance_t pinyin_instance_t; @@ -614,6 +600,6 @@ typedef ChewingKeyRest PinyinKeyPos; #define LIBPINYIN_FORMAT_VERSION "0.8.92" -}; +G_END_DECLS #endif diff --git a/src/storage/chewing_key.h b/src/storage/chewing_key.h index 41b5664..f3202e8 100644 --- a/src/storage/chewing_key.h +++ b/src/storage/chewing_key.h @@ -25,12 +25,14 @@ #include <glib.h> #include "chewing_enum.h" +using namespace pinyin; + +G_BEGIN_DECLS + /** @file chewing_key.h * @brief the definitions of chewing key related classes and structs. */ -namespace pinyin{ - /** Note: The parsed pinyins are stored in the following two * GArrays to speed up chewing table lookup. @@ -104,6 +106,6 @@ struct _ChewingKeyRest typedef struct _ChewingKeyRest ChewingKeyRest; -}; +G_END_DECLS #endif diff --git a/src/storage/pinyin_custom2.h b/src/storage/pinyin_custom2.h index 7e107c1..4685a07 100644 --- a/src/storage/pinyin_custom2.h +++ b/src/storage/pinyin_custom2.h @@ -22,7 +22,9 @@ #ifndef PINYIN_CUSTOM2_H #define PINYIN_CUSTOM2_H -namespace pinyin{ +#include <glib.h> + +G_BEGIN_DECLS /** * PinyinTableFlag: @@ -104,6 +106,6 @@ enum ChewingScheme CHEWING_DEFAULT = CHEWING_STANDARD }; -}; +G_END_DECLS #endif |