Browse Source

Move db_cxx.h to include dir, and fix valgrind issues. Fixes #197.

git-svn-id: file:///svn/tokudb@1218 c7de825b-a66e-492c-adef-691d508d4ae1
pull/56/head
Bradley C. Kuszmaul 19 years ago
parent
commit
76fa6643b5
  1. 3
      cxx/Makefile
  2. 7
      cxx/db.cpp
  3. 2
      cxx/dbc.cpp
  4. 2
      cxx/dbenv.cpp
  5. 2
      cxx/dbt.cpp
  6. 2
      cxx/dbtxn.cpp
  7. 2
      cxx/txn.cpp
  8. 0
      include/db_cxx.h

3
cxx/Makefile

@ -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)

7
cxx/db.cpp

@ -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) {

2
cxx/dbc.cpp

@ -1,4 +1,4 @@
#include "db_cxx.h"
#include <db_cxx.h>
int Dbc::close (void) {
DBC *dbc = this;

2
cxx/dbenv.cpp

@ -1,5 +1,5 @@
#include <assert.h>
#include "db_cxx.h"
#include <db_cxx.h>
DbEnv::DbEnv (u_int32_t flags) {
int ret = db_env_create(&the_env, flags & ~DB_CXX_NO_EXCEPTIONS);

2
cxx/dbt.cpp

@ -1,4 +1,4 @@
#include "db_cxx.h"
#include <db_cxx.h>
Dbt::Dbt(void) {
DBT *dbt = this;

2
cxx/dbtxn.cpp

@ -1,4 +1,4 @@
#include "db_cxx.h"
#include <db_cxx.h>
int DbTxn::commit (u_int32_t flags) {
DB_TXN *txn = get_DB_TXN();

2
cxx/txn.cpp

@ -1,5 +1,5 @@
#include <assert.h>
#include "db_cxx.h"
#include <db_cxx.h>
DbTxn::DbTxn(DB_TXN *txn)
: the_txn(txn)

0
cxx/db_cxx.h → include/db_cxx.h

Loading…
Cancel
Save