diff options
| author | Peng Wu <alexepico@gmail.com> | 2025-11-11 14:40:10 +0800 |
|---|---|---|
| committer | Peng Wu <alexepico@gmail.com> | 2025-11-12 15:12:33 +0800 |
| commit | f8b27d6be83b94300e00b24193bff1277b13838f (patch) | |
| tree | a580eee958b4e571fd525894ea49609e5fb9e9b2 /src | |
| parent | 426e5e78c99c481fd9afd9928dfd613eba5e14fc (diff) | |
| download | libpinyin-f8b27d6be83b94300e00b24193bff1277b13838f.tar.gz libpinyin-f8b27d6be83b94300e00b24193bff1277b13838f.tar.xz libpinyin-f8b27d6be83b94300e00b24193bff1277b13838f.zip | |
Fix some typos
Diffstat (limited to 'src')
| -rw-r--r-- | src/storage/ngram.h | 4 | ||||
| -rw-r--r-- | src/storage/ngram_kyotodb.cpp | 2 | ||||
| -rw-r--r-- | src/storage/ngram_kyotodb.h | 4 |
3 files changed, 8 insertions, 2 deletions
diff --git a/src/storage/ngram.h b/src/storage/ngram.h index 57979b4..cb90cd0 100644 --- a/src/storage/ngram.h +++ b/src/storage/ngram.h @@ -34,6 +34,10 @@ #include "ngram_kyotodb.h" #endif +#ifdef HAVE_TKRZW +#include "ngram_tkrzwdb.h" +#endif + namespace pinyin{ class Bigram; diff --git a/src/storage/ngram_kyotodb.cpp b/src/storage/ngram_kyotodb.cpp index 560e196..e12d3b8 100644 --- a/src/storage/ngram_kyotodb.cpp +++ b/src/storage/ngram_kyotodb.cpp @@ -80,6 +80,8 @@ bool Bigram::load_db(const char * dbfile){ } bool Bigram::save_db(const char * dbfile){ + if (!m_db) + return false; int ret = unlink(dbfile); if ( ret != 0 && errno != ENOENT) diff --git a/src/storage/ngram_kyotodb.h b/src/storage/ngram_kyotodb.h index f1f28d8..7dfdbb8 100644 --- a/src/storage/ngram_kyotodb.h +++ b/src/storage/ngram_kyotodb.h @@ -82,11 +82,11 @@ public: /** * Bigram::attach: - * @dbfile: the Berkeley DB file name. + * @dbfile: the Kyoto Cabinet file name. * @flags: the flags of enum ATTACH_FLAG. * @returns: whether the attach operation is successful. * - * Attach this Bigram with the Berkeley DB. + * Attach this Bigram with the Kyoto Cabinet. * */ bool attach(const char * dbfile, guint32 flags); |
