git-svn-id: file:///svn/tokudb@1218 c7de825b-a66e-492c-adef-691d508d4ae1
@ -10,8 +10,7 @@ LIBNAME = libtdb_cxx
default: install
install: $(LIBNAME).a
cp $< ../lib/
cp db_cxx.h ../include/
$(OBJS): db_cxx.h
$(OBJS): ../include/db_cxx.h
test1: test1.o dbt.o db.o dbenv.o ../lib/libdb.a
$(LIBNAME).a: $(OBJS)
@ -1,16 +1,15 @@
#include <assert.h>
#include <db.h>
#include <errno.h>
#include "db_cxx.h"
#include <db_cxx.h>
Db::Db(DbEnv *env, u_int32_t flags)
: the_Env(env)
{
the_db = 0;
if (the_Env == 0) {
is_private_env = 1;
}
is_private_env = (the_Env == 0);
DB *tmp_db;
int ret = db_create(&tmp_db, the_Env->get_DB_ENV(), flags & !(DB_CXX_NO_EXCEPTIONS));
if (ret!=0) {
@ -1,4 +1,4 @@
int Dbc::close (void) {
DBC *dbc = this;
@ -1,5 +1,5 @@
DbEnv::DbEnv (u_int32_t flags) {
int ret = db_env_create(&the_env, flags & ~DB_CXX_NO_EXCEPTIONS);
Dbt::Dbt(void) {
DBT *dbt = this;
int DbTxn::commit (u_int32_t flags) {
DB_TXN *txn = get_DB_TXN();
DbTxn::DbTxn(DB_TXN *txn)
: the_txn(txn)