summaryrefslogtreecommitdiff
path: root/xmlhelp
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2006-11-01 13:07:37 +0000
committerVladimir Glazounov <vg@openoffice.org>2006-11-01 13:07:37 +0000
commitdbb63ba1d88010c48514a790269b20bc4988faad (patch)
tree9b72749920f11bfae4c793b076fbb05eab6e5ae1 /xmlhelp
parent396fa0876b22229dd1df8d7c68d06595cf679cee (diff)
INTEGRATION: CWS abi31 (1.5.6); FILE MERGED
2006/10/26 14:53:06 abi 1.5.6.1: i#69213# applied patch
Diffstat (limited to 'xmlhelp')
-rw-r--r--xmlhelp/source/cxxhelp/provider/db.cxx47
1 files changed, 4 insertions, 43 deletions
diff --git a/xmlhelp/source/cxxhelp/provider/db.cxx b/xmlhelp/source/cxxhelp/provider/db.cxx
index c88aeeec415c..21a7162a0fc4 100644
--- a/xmlhelp/source/cxxhelp/provider/db.cxx
+++ b/xmlhelp/source/cxxhelp/provider/db.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: db.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: obo $ $Date: 2006-09-17 01:16:31 $
+ * last change: $Author: vg $ $Date: 2006-11-01 14:07:37 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -59,44 +59,6 @@ namespace berkeleydbproxy {
//----------------------------------------------------------------------------
-DbEnv::DbEnv(u_int32_t flags)
-: m_pDBENV(0)
-{
- db_internal::check_error( db_env_create(&m_pDBENV,flags), "DbEnv::DbEnv" );
-}
-
-DbEnv::~DbEnv()
-{
- if (m_pDBENV)
- {
- // should not happen
- // TODO: add assert
- m_pDBENV->close(m_pDBENV,0);
- }
-}
-
-int DbEnv::open(const char *db_home, u_int32_t flags, int mode)
-{
- return db_internal::check_error( m_pDBENV->open(m_pDBENV,db_home,flags,mode), "DbEnv::open" );
-}
-
-void DbEnv::close(u_int32_t flags)
-{
- int error = m_pDBENV->close(m_pDBENV,flags);
- m_pDBENV = 0;
-
- db_internal::check_error(error, "DbEnv::close");
-}
-
-int DbEnv::set_alloc(db_malloc_fcn_type app_malloc,
- db_realloc_fcn_type app_realloc,
- db_free_fcn_type app_free)
-{
- int err = m_pDBENV->set_alloc(m_pDBENV,app_malloc,app_realloc,app_free);
- return db_internal::check_error(err,"Db::set_alloc");
-}
-//----------------------------------------------------------------------------
-
int Db::set_alloc( db_malloc_fcn_type app_malloc,
db_realloc_fcn_type app_realloc,
db_free_fcn_type app_free)
@@ -105,10 +67,9 @@ int Db::set_alloc( db_malloc_fcn_type app_malloc,
return db_internal::check_error(err,"Db::set_alloc");
}
-Db::Db(DbEnv* pDbenv,u_int32_t flags)
-: m_pDBP(0)
+Db::Db()
{
- db_internal::check_error( db_create(&m_pDBP,pDbenv ? pDbenv->m_pDBENV:0,flags),"Db::Db" );
+ db_internal::check_error( db_create(&m_pDBP,0,0),"Db::Db" );
}