diff options
author | Peng Wu <alexepico@gmail.com> | 2016-07-11 15:13:19 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2016-07-11 15:13:19 +0800 |
commit | f043223306836ab25dce6526faba4448fe14d060 (patch) | |
tree | 873739aa06ad700ff14103d1752f569003c9a678 /src/storage | |
parent | 6a9d8e207d844eb52abe7c9c53341008cddc14db (diff) | |
download | libpinyin-f043223306836ab25dce6526faba4448fe14d060.tar.gz libpinyin-f043223306836ab25dce6526faba4448fe14d060.tar.xz libpinyin-f043223306836ab25dce6526faba4448fe14d060.zip |
fixes mask_out methods with Berkeley DB
Diffstat (limited to 'src/storage')
-rw-r--r-- | src/storage/chewing_large_table2_bdb.cpp | 3 | ||||
-rw-r--r-- | src/storage/phrase_large_table3_bdb.cpp | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/storage/chewing_large_table2_bdb.cpp b/src/storage/chewing_large_table2_bdb.cpp index 66ea188..5e23d38 100644 --- a/src/storage/chewing_large_table2_bdb.cpp +++ b/src/storage/chewing_large_table2_bdb.cpp @@ -420,7 +420,8 @@ bool ChewingLargeTable2::mask_out(phrase_token_t mask, memset(&db_data, 0, sizeof(DBT)); \ db_data.data = entry->m_chunk.begin(); \ db_data.size = entry->m_chunk.size(); \ - int ret = cursorp->put(cursorp, &db_key, &db_data, 0); \ + int ret = cursorp->put \ + (cursorp, &db_key, &db_data, DB_CURRENT); \ assert(ret == 0); \ break; \ } diff --git a/src/storage/phrase_large_table3_bdb.cpp b/src/storage/phrase_large_table3_bdb.cpp index dcb34b8..c797922 100644 --- a/src/storage/phrase_large_table3_bdb.cpp +++ b/src/storage/phrase_large_table3_bdb.cpp @@ -301,7 +301,7 @@ bool PhraseLargeTable3::mask_out(phrase_token_t mask, memset(&db_data, 0, sizeof(DBT)); db_data.data = entry.m_chunk.begin(); db_data.size = entry.m_chunk.size(); - int ret = cursorp->put(cursorp, &db_key, &db_data, 0); + int ret = cursorp->put(cursorp, &db_key, &db_data, DB_CURRENT); assert(ret == 0); } assert(ret == DB_NOTFOUND); |