summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2011-08-08 15:32:08 +0800
committerPeng Wu <alexepico@gmail.com>2011-08-08 15:32:08 +0800
commitfb0111bf00989afe61d075544b1dd11ce0f69dde (patch)
tree47d87fcc8d90f691ba67c3f997d171ee0145f557
parent3de71392c23ff1012b9c38a03e6a53942eb704d5 (diff)
downloadlibpinyin-fb0111bf00989afe61d075544b1dd11ce0f69dde.tar.gz
libpinyin-fb0111bf00989afe61d075544b1dd11ce0f69dde.tar.xz
libpinyin-fb0111bf00989afe61d075544b1dd11ce0f69dde.zip
fixes tag utility with namespace
-rw-r--r--src/storage/tag_utility.cpp4
-rw-r--r--src/storage/tag_utility.h9
2 files changed, 8 insertions, 5 deletions
diff --git a/src/storage/tag_utility.cpp b/src/storage/tag_utility.cpp
index a0179f3..2f4626a 100644
--- a/src/storage/tag_utility.cpp
+++ b/src/storage/tag_utility.cpp
@@ -7,7 +7,7 @@
#include "phrase_large_table.h"
#include "tag_utility.h"
-using namespace pinyin;
+namespace pinyin{
/* internal taglib structure */
struct tag_entry{
@@ -390,3 +390,5 @@ char * taglib_token_to_string(FacadePhraseIndex * phrase_index,
phrase = g_utf16_to_utf8(buffer, length, NULL, NULL, NULL);
return phrase;
}
+
+};
diff --git a/src/storage/tag_utility.h b/src/storage/tag_utility.h
index d52b2c4..6f4c9fc 100644
--- a/src/storage/tag_utility.h
+++ b/src/storage/tag_utility.h
@@ -28,6 +28,8 @@
* Maybe the optional tag will be added back later.
*/
+namespace pinyin{
+
bool taglib_init();
/* Note: most tags are separated by ',' or ':' . */
@@ -53,12 +55,9 @@ bool taglib_pop_state();
bool taglib_fini();
-namespace pinyin{
+
class PhraseLargeTable;
class FacadePhraseIndex;
-};
-
-using namespace pinyin;
phrase_token_t taglib_string_to_token(PhraseLargeTable * phrases,
const char * string);
@@ -66,4 +65,6 @@ phrase_token_t taglib_string_to_token(PhraseLargeTable * phrases,
char * taglib_token_to_string(FacadePhraseIndex * phrase_index,
phrase_token_t token);
+};
+
#endif