Commit 77dc1487 authored by John Esmet's avatar John Esmet Committed by Yoni Fogel

refs #5515 no more tokudb_native_h


git-svn-id: file:///svn/toku/tokudb@48078 c7de825b-a66e-492c-adef-691d508d4ae1
parent ca73e89e
......@@ -525,7 +525,6 @@ int main (int argc, char *const argv[] __attribute__((__unused__))) {
printf("#if defined(__cplusplus) || defined(__cilkplusplus)\nextern \"C\" {\n#endif\n");
printf("#define TOKUDB 1\n");
printf("#define TOKUDB_NATIVE_H 1\n");
printf("#define DB_VERSION_MAJOR %d\n", DB_VERSION_MAJOR);
printf("#define DB_VERSION_MINOR %d\n", DB_VERSION_MINOR);
printf("/* As of r40364 (post TokuDB 5.2.7), the patch version number is 100+ the BDB header patch version number.*/\n");
......
......@@ -639,9 +639,6 @@ toku_c_close(DBC * c) {
toku_ft_cursor_close(dbc_struct_i(c)->c);
toku_sdbt_cleanup(&dbc_struct_i(c)->skey_s);
toku_sdbt_cleanup(&dbc_struct_i(c)->sval_s);
#if !TOKUDB_NATIVE_H
toku_free(dbc_struct_i(c));
#endif
toku_free(c);
return 0;
}
......@@ -831,10 +828,6 @@ toku_db_cursor_internal(DB * db, DB_TXN * txn, DBC ** c, uint32_t flags, int is_
SCRS(c_close);
#undef SCRS
#if !TOKUDB_NATIVE_H
MALLOC(result->i); // otherwise it is allocated as part of result->ii
assert(result->i);
#endif
result->dbp = db;
dbc_struct_i(result)->txn = txn;
......@@ -877,9 +870,6 @@ toku_db_cursor_internal(DB * db, DB_TXN * txn, DBC ** c, uint32_t flags, int is_
*c = result;
}
else {
#if !TOKUDB_NATIVE_H
toku_free(result->i); // otherwise it is allocated as part of result->ii
#endif
toku_free(result);
}
return r;
......
......@@ -46,9 +46,6 @@ toku_txn_destroy(DB_TXN *txn) {
invariant(open_txns >= 0);
toku_txn_destroy_txn(db_txn_struct_i(txn)->tokutxn);
toku_mutex_destroy(&db_txn_struct_i(txn)->txn_mutex);
#if !TOKUDB_NATIVE_H
toku_free(db_txn_struct_i(txn));
#endif
toku_free(txn);
}
......@@ -423,13 +420,6 @@ toku_txn_begin(DB_ENV *env, DB_TXN * stxn, DB_TXN ** txn, uint32_t flags) {
txn_func_init(result);
result->parent = stxn;
#if !TOKUDB_NATIVE_H
CALLOC(db_txn_struct_i(result));
if (!db_txn_struct_i(result)) {
toku_free(result);
return ENOMEM;
}
#endif
db_txn_struct_i(result)->flags = txn_flags;
db_txn_struct_i(result)->iso = child_isolation;
......@@ -491,19 +481,8 @@ void toku_keep_prepared_txn_callback (DB_ENV *env, TOKUTXN tokutxn) {
txn_func_init(result);
result->parent = NULL;
#if !TOKUDB_NATIVE_H
CALLOC(db_txn_struct_i(result));
if (!db_txn_struct_i(result)) {
toku_free(result);
return ENOMEM;
}
#endif
{
int r = toku_lth_create(&db_txn_struct_i(result)->lth);
assert(r==0);
}
int r = toku_lth_create(&db_txn_struct_i(result)->lth);
assert(r==0);
db_txn_struct_i(result)->tokutxn = tokutxn;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment