mariadb/cxx/dbc.cpp
Bradley C. Kuszmaul 8bf12e1bc3 db_dump_e.cpp test runs. Addresses #215. Fixes #216.
git-svn-id: file:///svn/tokudb@1321 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-21 20:39:53 +00:00

16 lines
490 B
C++

#include <db_cxx.h>
int Dbc::close (void) {
DBC *dbc = this;
DbEnv *env = (DbEnv*)dbc->dbp->api_internal; // Must grab the env before closing the cursor.
int ret = dbc->c_close(dbc);
return env->maybe_throw_error(ret);
}
int Dbc::get(Dbt* key, Dbt *data, u_int32_t flags) {
DBC *dbc = this;
int ret = dbc->c_get(dbc, key, data, flags);
DB_ENV *dbenv_c=dbc->dbp->dbenv;
DbEnv *env = (DbEnv*)dbenv_c->api1_internal;
return env->maybe_throw_error(ret);
}