summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2011-05-13 10:35:07 +0800
committerPeng Wu <alexepico@gmail.com>2011-05-13 10:35:07 +0800
commit58f510f72eb5cbb321dd6783a98b6c8e0ac304bb (patch)
tree6e5c59006285642a25acb2b31b85ee9ed1055dd4 /src
parentfc8fd83c063c0a99bbe4973529670c63e1113cc5 (diff)
downloadlibpinyin-58f510f72eb5cbb321dd6783a98b6c8e0ac304bb.tar.gz
libpinyin-58f510f72eb5cbb321dd6783a98b6c8e0ac304bb.tar.xz
libpinyin-58f510f72eb5cbb321dd6783a98b6c8e0ac304bb.zip
add berkeley db sync
Diffstat (limited to 'src')
-rw-r--r--src/storage/flexible_ngram.h1
-rw-r--r--src/storage/ngram.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/storage/flexible_ngram.h b/src/storage/flexible_ngram.h
index 83cf439..9082235 100644
--- a/src/storage/flexible_ngram.h
+++ b/src/storage/flexible_ngram.h
@@ -256,6 +256,7 @@ private:
void reset(){
if ( m_db ){
+ m_db->sync(m_db, 0);
m_db->close(m_db, 0);
m_db = NULL;
}
diff --git a/src/storage/ngram.h b/src/storage/ngram.h
index a2bc7b6..f8b59f1 100644
--- a/src/storage/ngram.h
+++ b/src/storage/ngram.h
@@ -97,6 +97,7 @@ private:
void reset(){
if ( m_db ){
+ m_db->sync(m_db, 0);
m_db->close(m_db, 0);
m_db = NULL;
}