1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-30 05:23:50 +03:00
Files
mariadb/cxx/dbc.cpp
Bradley C. Kuszmaul 9d70992a1d Clean up the valgrind memory leaks (caused by lots of subtle c++ bugs. Addresse #215
git-svn-id: file:///svn/tokudb@1320 c7de825b-a66e-492c-adef-691d508d4ae1
2007-12-21 19:59:31 +00:00

16 lines
453 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);
DbEnv *env = (DbEnv*)dbc->dbp->api_internal;
return env->maybe_throw_error(ret);
}