diff options
author | Peng Wu <alexepico@gmail.com> | 2016-01-08 12:12:30 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2016-01-08 12:12:30 +0800 |
commit | d9c257652632721cd933df93a71fdb33754ca09a (patch) | |
tree | cdd5d9e6454e85fdab2bcdd24bab6bd73a94a9f1 | |
parent | 496a95e798e6783d35f96fa3b5bdb555db825a41 (diff) | |
download | libpinyin-d9c257652632721cd933df93a71fdb33754ca09a.tar.gz libpinyin-d9c257652632721cd933df93a71fdb33754ca09a.tar.xz libpinyin-d9c257652632721cd933df93a71fdb33754ca09a.zip |
add phrase_large_table3.cpp
-rw-r--r-- | src/storage/phrase_large_table3.cpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/storage/phrase_large_table3.cpp b/src/storage/phrase_large_table3.cpp new file mode 100644 index 0000000..bc834fd --- /dev/null +++ b/src/storage/phrase_large_table3.cpp @@ -0,0 +1,38 @@ +/* + * libpinyin + * Library to deal with pinyin. + * + * Copyright (C) 2016 Peng Wu <alexepico@gmail.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include <datrie/trie.h> +#include "phrase_large_table3.h" + +namespace pinyin{ +void PhraseLargeTable3::reset() { + if (m_index) { + trie_free(m_index); + m_index = NULL; + } + if (m_content) { + delete m_content; + m_content = NULL; + } +} + + +}; |