summaryrefslogtreecommitdiff
path: root/lang/cxx
diff options
context:
space:
mode:
Diffstat (limited to 'lang/cxx')
-rw-r--r--lang/cxx/cxx_channel.cpp2
-rw-r--r--lang/cxx/cxx_db.cpp38
-rw-r--r--lang/cxx/cxx_dbc.cpp20
-rw-r--r--lang/cxx/cxx_dbstream.cpp55
-rw-r--r--lang/cxx/cxx_dbt.cpp2
-rw-r--r--lang/cxx/cxx_env.cpp42
-rw-r--r--lang/cxx/cxx_except.cpp2
-rw-r--r--lang/cxx/cxx_lock.cpp2
-rw-r--r--lang/cxx/cxx_logc.cpp2
-rw-r--r--lang/cxx/cxx_mpool.cpp2
-rw-r--r--lang/cxx/cxx_multi.cpp2
-rw-r--r--lang/cxx/cxx_rid.cpp2
-rw-r--r--lang/cxx/cxx_seq.cpp8
-rw-r--r--lang/cxx/cxx_site.cpp2
-rw-r--r--lang/cxx/cxx_txn.cpp2
-rw-r--r--lang/cxx/stl/dbstl_base_iterator.h2
-rw-r--r--lang/cxx/stl/dbstl_container.cpp2
-rw-r--r--lang/cxx/stl/dbstl_container.h2
-rw-r--r--lang/cxx/stl/dbstl_dbc.h2
-rw-r--r--lang/cxx/stl/dbstl_dbt.h2
-rw-r--r--lang/cxx/stl/dbstl_element_ref.h2
-rw-r--r--lang/cxx/stl/dbstl_exception.h2
-rw-r--r--lang/cxx/stl/dbstl_inner_utility.h2
-rw-r--r--lang/cxx/stl/dbstl_map.h38
-rw-r--r--lang/cxx/stl/dbstl_resource_manager.cpp2
-rw-r--r--lang/cxx/stl/dbstl_resource_manager.h2
-rw-r--r--lang/cxx/stl/dbstl_set.h40
-rw-r--r--lang/cxx/stl/dbstl_utility.h2
-rw-r--r--lang/cxx/stl/dbstl_vector.h18
29 files changed, 212 insertions, 89 deletions
diff --git a/lang/cxx/cxx_channel.cpp b/lang/cxx/cxx_channel.cpp
index 72127112..13e001ef 100644
--- a/lang/cxx/cxx_channel.cpp
+++ b/lang/cxx/cxx_channel.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2011, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/lang/cxx/cxx_db.cpp b/lang/cxx/cxx_db.cpp
index 366f707a..52119d41 100644
--- a/lang/cxx/cxx_db.cpp
+++ b/lang/cxx/cxx_db.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -513,15 +513,17 @@ DB_SET_CALLBACK(set_append_recno, append_recno,
(int (*arg)(Db *cxxthis, Dbt *data, db_recno_t recno)), arg)
DB_CALLBACK_C_INTERCEPT(bt_compare,
- int, (DB *cthis, const DBT *data1, const DBT *data2),
+ int, (DB *cthis, const DBT *data1, const DBT *data2, size_t *locp),
return,
- (cxxthis, Dbt::get_const_Dbt(data1), Dbt::get_const_Dbt(data2)))
+ (cxxthis, Dbt::get_const_Dbt(data1), Dbt::get_const_Dbt(data2), locp))
DB_GET_CALLBACK(get_bt_compare, bt_compare,
- (int (**argp)(Db *cxxthis, const Dbt *data1, const Dbt *data2)), argp)
+ (int (**argp)(Db *cxxthis, const Dbt *data1, const Dbt *data2,
+ size_t *locp)), argp)
DB_SET_CALLBACK(set_bt_compare, bt_compare,
- (int (*arg)(Db *cxxthis, const Dbt *data1, const Dbt *data2)), arg)
+ (int (*arg)(Db *cxxthis, const Dbt *data1, const Dbt *data2,
+ size_t *locp)), arg)
DB_CALLBACK_C_INTERCEPT(bt_compress,
int, (DB *cthis, const DBT *data1, const DBT *data2, const DBT *data3,
@@ -577,26 +579,30 @@ DB_SET_CALLBACK(set_bt_prefix, bt_prefix,
(size_t (*arg)(Db *cxxthis, const Dbt *data1, const Dbt *data2)), arg)
DB_CALLBACK_C_INTERCEPT(dup_compare,
- int, (DB *cthis, const DBT *data1, const DBT *data2),
+ int, (DB *cthis, const DBT *data1, const DBT *data2, size_t *locp),
return,
- (cxxthis, Dbt::get_const_Dbt(data1), Dbt::get_const_Dbt(data2)))
+ (cxxthis, Dbt::get_const_Dbt(data1), Dbt::get_const_Dbt(data2), locp))
DB_GET_CALLBACK(get_dup_compare, dup_compare,
- (int (**argp)(Db *cxxthis, const Dbt *data1, const Dbt *data2)), argp)
+ (int (**argp)(Db *cxxthis, const Dbt *data1, const Dbt *data2,
+ size_t *locp)), argp)
DB_SET_CALLBACK(set_dup_compare, dup_compare,
- (int (*arg)(Db *cxxthis, const Dbt *data1, const Dbt *data2)), arg)
+ (int (*arg)(Db *cxxthis, const Dbt *data1, const Dbt *data2,
+ size_t *locp)), arg)
DB_CALLBACK_C_INTERCEPT(h_compare,
- int, (DB *cthis, const DBT *data1, const DBT *data2),
+ int, (DB *cthis, const DBT *data1, const DBT *data2, size_t *locp),
return,
- (cxxthis, Dbt::get_const_Dbt(data1), Dbt::get_const_Dbt(data2)))
+ (cxxthis, Dbt::get_const_Dbt(data1), Dbt::get_const_Dbt(data2), locp))
DB_GET_CALLBACK(get_h_compare, h_compare,
- (int (**argp)(Db *cxxthis, const Dbt *data1, const Dbt *data2)), argp)
+ (int (**argp)(Db *cxxthis, const Dbt *data1, const Dbt *data2,
+ size_t *locp)), argp)
DB_SET_CALLBACK(set_h_compare, h_compare,
- (int (*arg)(Db *cxxthis, const Dbt *data1, const Dbt *data2)), arg)
+ (int (*arg)(Db *cxxthis, const Dbt *data1, const Dbt *data2,
+ size_t *locp)), arg)
DB_CALLBACK_C_INTERCEPT(h_hash,
u_int32_t, (DB *cthis, const void *data, u_int32_t len),
@@ -653,6 +659,12 @@ int Db::verify(const char *name, const char *subdb,
return (ret);
}
+DB_METHOD(set_blob_dir, (const char *dir), (db, dir), DB_RETOK_STD)
+DB_METHOD(get_blob_dir, (const char **dir), (db, dir), DB_RETOK_STD)
+DB_METHOD(set_blob_threshold, (u_int32_t bytes, u_int32_t flags),
+ (db, bytes, flags), DB_RETOK_STD)
+DB_METHOD(get_blob_threshold, (u_int32_t *bytes),
+ (db, bytes), DB_RETOK_STD)
DB_METHOD(set_bt_compare, (bt_compare_fcn_type func),
(db, func), DB_RETOK_STD)
DB_METHOD(get_bt_minkey, (u_int32_t *bt_minkeyp),
diff --git a/lang/cxx/cxx_dbc.cpp b/lang/cxx/cxx_dbc.cpp
index 642327d0..e16f7732 100644
--- a/lang/cxx/cxx_dbc.cpp
+++ b/lang/cxx/cxx_dbc.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -50,6 +50,24 @@ DBC_METHOD(cmp, (Dbc *other_cursor, int *result, u_int32_t _flags),
(dbc, other_cursor, result, _flags), DB_RETOK_STD)
DBC_METHOD(count, (db_recno_t *countp, u_int32_t _flags),
(dbc, countp, _flags), DB_RETOK_STD)
+
+int Dbc::db_stream(DbStream** dbsp, u_int32_t _flags)
+{
+ int ret;
+ DBC *dbc = this;
+ DB_STREAM *dbs = 0;
+
+ ret = dbc->db_stream(dbc, &dbs, _flags);
+
+ if (DB_RETOK_STD(ret))
+ *dbsp = (DbStream*)dbs;
+ else
+ DB_ERROR(DbEnv::get_DbEnv(dbc->dbenv),
+ "Dbc::db_stream", ret, ON_ERROR_UNKNOWN);
+
+ return (ret);
+}
+
DBC_METHOD(del, (u_int32_t _flags),
(dbc, _flags), DB_RETOK_DBCDEL)
diff --git a/lang/cxx/cxx_dbstream.cpp b/lang/cxx/cxx_dbstream.cpp
new file mode 100644
index 00000000..e158c384
--- /dev/null
+++ b/lang/cxx/cxx_dbstream.cpp
@@ -0,0 +1,55 @@
+/*-
+ * See the file LICENSE for redistribution information.
+ *
+ * Copyright (c) 2013, 2015 Oracle and/or its affiliates. All rights reserved.
+ *
+ * $Id$
+ */
+
+#include "db_config.h"
+
+#include "db_int.h"
+
+#include "db_cxx.h"
+#include "dbinc/cxx_int.h"
+
+#include "dbinc/db_page.h"
+#include "dbinc/db_am.h"
+#include "dbinc/blob.h"
+#include "dbinc/fop.h"
+#include "dbinc/mp.h"
+
+// Helper macro for simple methods that pass through to the
+// underlying C method. It may return an error or raise an exception.
+// Note this macro expects that input _argspec is an argument
+// list element (e.g., "char *arg") and that _arglist is the arguments
+// that should be passed through to the C method (e.g., "(db, arg)")
+//
+#define DBSTREAM_METHOD(_name, _argspec, _arglist) \
+int DbStream::_name _argspec \
+{ \
+ int ret; \
+ DB_STREAM *dbs = this; \
+ \
+ ret = dbs->_name _arglist; \
+ if (!DB_RETOK_STD(ret)) \
+ DB_ERROR(DbEnv::get_DbEnv(dbs->dbc->dbenv), \
+ "Dbstream::" # _name, ret, ON_ERROR_UNKNOWN); \
+ return (ret); \
+}
+
+// It's private, and should never be called, but VC4.0 needs it resolved
+//
+DbStream::~DbStream()
+{
+}
+
+DBSTREAM_METHOD(close, (u_int32_t _flags), (dbs, _flags));
+DBSTREAM_METHOD(read,
+ (Dbt *data, db_off_t offset, u_int32_t size, u_int32_t _flags),
+ (dbs, data, offset, size, _flags));
+DBSTREAM_METHOD(size, (db_off_t *size, u_int32_t _flags),
+ (dbs, size, _flags));
+DBSTREAM_METHOD(write, (Dbt *data, db_off_t offset, u_int32_t _flags),
+ (dbs, data, offset, _flags));
+
diff --git a/lang/cxx/cxx_dbt.cpp b/lang/cxx/cxx_dbt.cpp
index 722764f1..34002563 100644
--- a/lang/cxx/cxx_dbt.cpp
+++ b/lang/cxx/cxx_dbt.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/lang/cxx/cxx_env.cpp b/lang/cxx/cxx_env.cpp
index aae95bec..dd0486b7 100644
--- a/lang/cxx/cxx_env.cpp
+++ b/lang/cxx/cxx_env.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -90,6 +90,13 @@ void _paniccall_intercept_c(DB_ENV *dbenv, int errval)
}
extern "C"
+int _partial_rep_intercept_c(DB_ENV *dbenv,
+ const char *name, int *result, u_int32_t flags)
+{
+ return (DbEnv::_partial_rep_intercept(dbenv, name, result, flags));
+}
+
+extern "C"
void _event_func_intercept_c(DB_ENV *dbenv, u_int32_t event, void *event_info)
{
DbEnv::_event_func_intercept(dbenv, event, event_info);
@@ -203,6 +210,18 @@ void DbEnv::_paniccall_intercept(DB_ENV *dbenv, int errval)
(*cxxenv->paniccall_callback_)(cxxenv, errval);
}
+int DbEnv::_partial_rep_intercept(DB_ENV *dbenv,
+ const char *name, int *result, u_int32_t flags)
+{
+ DbEnv *cxxenv = DbEnv::get_DbEnv(dbenv);
+ if (cxxenv == 0) {
+ DB_ERROR(0,
+ "DbEnv::partial_rep_callback", EINVAL, ON_ERROR_UNKNOWN);
+ return (EINVAL);
+ }
+ return ((*cxxenv->partial_rep_callback_)(cxxenv, name, result, flags));
+}
+
void DbEnv::_event_func_intercept(
DB_ENV *dbenv, u_int32_t event, void *event_info)
{
@@ -381,6 +400,7 @@ DbEnv::DbEnv(u_int32_t flags)
, app_dispatch_callback_(0)
, feedback_callback_(0)
, paniccall_callback_(0)
+, partial_rep_callback_(0)
, event_func_callback_(0)
, rep_send_callback_(0)
, message_dispatch_callback_(0)
@@ -399,6 +419,7 @@ DbEnv::DbEnv(DB_ENV *dbenv, u_int32_t flags)
, app_dispatch_callback_(0)
, feedback_callback_(0)
, paniccall_callback_(0)
+, partial_rep_callback_(0)
, event_func_callback_(0)
, rep_send_callback_(0)
, message_dispatch_callback_(0)
@@ -825,6 +846,10 @@ char *DbEnv::strerror(int error)
//
DBENV_METHOD(get_backup_config, (DB_BACKUP_CONFIG type, u_int32_t *valuep), (dbenv, type, valuep))
DBENV_METHOD(set_backup_config, (DB_BACKUP_CONFIG type, u_int32_t value), (dbenv, type, value))
+DBENV_METHOD(get_blob_dir, (const char **dir), (dbenv, dir))
+DBENV_METHOD(set_blob_dir, (const char *dir), (dbenv, dir))
+DBENV_METHOD(get_blob_threshold, (u_int32_t *bytes), (dbenv, bytes))
+DBENV_METHOD(set_blob_threshold, (u_int32_t bytes, u_int32_t flags), (dbenv, bytes, flags))
DBENV_METHOD(set_data_dir, (const char *dir), (dbenv, dir))
DBENV_METHOD(get_encrypt_flags, (u_int32_t *flagsp),
(dbenv, flagsp))
@@ -1331,8 +1356,23 @@ DBENV_METHOD(rep_get_timeout, (int which, db_timeout_t * timeout),
(dbenv, which, timeout))
DBENV_METHOD(rep_set_timeout, (int which, db_timeout_t timeout),
(dbenv, which, timeout))
+
+int DbEnv::rep_set_view(int (*arg)(DbEnv *, const char *, int *, u_int32_t))
+{
+ DB_ENV *dbenv = unwrap(this);
+
+ partial_rep_callback_ = arg;
+
+ return (dbenv->rep_set_view(dbenv,
+ arg == 0 ? 0 : _partial_rep_intercept_c));
+}
+
DBENV_METHOD(repmgr_get_ack_policy, (int *policy), (dbenv, policy))
DBENV_METHOD(repmgr_set_ack_policy, (int policy), (dbenv, policy))
+DBENV_METHOD(repmgr_get_incoming_queue_max,
+ (u_int32_t *gbytesp, u_int32_t *bytesp), (dbenv, gbytesp, bytesp));
+DBENV_METHOD(repmgr_set_incoming_queue_max,
+ (u_int32_t gbytes, u_int32_t bytes), (dbenv, gbytes, bytes));
int DbEnv::repmgr_channel(int eid, DbChannel **dbchannel, u_int32_t flags)
{
diff --git a/lang/cxx/cxx_except.cpp b/lang/cxx/cxx_except.cpp
index dd095bbd..971904f1 100644
--- a/lang/cxx/cxx_except.cpp
+++ b/lang/cxx/cxx_except.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/lang/cxx/cxx_lock.cpp b/lang/cxx/cxx_lock.cpp
index 8f367df8..238d6b20 100644
--- a/lang/cxx/cxx_lock.cpp
+++ b/lang/cxx/cxx_lock.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/lang/cxx/cxx_logc.cpp b/lang/cxx/cxx_logc.cpp
index 28fd1fc1..70f05f8a 100644
--- a/lang/cxx/cxx_logc.cpp
+++ b/lang/cxx/cxx_logc.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/lang/cxx/cxx_mpool.cpp b/lang/cxx/cxx_mpool.cpp
index 7255e30d..30e2fd55 100644
--- a/lang/cxx/cxx_mpool.cpp
+++ b/lang/cxx/cxx_mpool.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/lang/cxx/cxx_multi.cpp b/lang/cxx/cxx_multi.cpp
index 04eb0ece..54cc03a0 100644
--- a/lang/cxx/cxx_multi.cpp
+++ b/lang/cxx/cxx_multi.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/lang/cxx/cxx_rid.cpp b/lang/cxx/cxx_rid.cpp
index 3ea0b0b9..c6fbef92 100644
--- a/lang/cxx/cxx_rid.cpp
+++ b/lang/cxx/cxx_rid.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2011, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/lang/cxx/cxx_seq.cpp b/lang/cxx/cxx_seq.cpp
index 5cd1b4ec..e328d35b 100644
--- a/lang/cxx/cxx_seq.cpp
+++ b/lang/cxx/cxx_seq.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -76,10 +76,10 @@ DBSEQ_METHOD(stat, (DB_SEQUENCE_STAT **sp, u_int32_t flags),
DBSEQ_METHOD(stat_print, (u_int32_t flags), (seq, flags), 0)
DBSEQ_METHOD(get,
- (DbTxn *txnid, int32_t delta, db_seq_t *retp, u_int32_t flags),
+ (DbTxn *txnid, u_int32_t delta, db_seq_t *retp, u_int32_t flags),
(seq, unwrap(txnid), delta, retp, flags), 0)
-DBSEQ_METHOD(get_cachesize, (int32_t *sizep), (seq, sizep), 0)
-DBSEQ_METHOD(set_cachesize, (int32_t size), (seq, size), 0)
+DBSEQ_METHOD(get_cachesize, (u_int32_t *sizep), (seq, sizep), 0)
+DBSEQ_METHOD(set_cachesize, (u_int32_t size), (seq, size), 0)
DBSEQ_METHOD(get_flags, (u_int32_t *flagsp), (seq, flagsp), 0)
DBSEQ_METHOD(set_flags, (u_int32_t flags), (seq, flags), 0)
DBSEQ_METHOD(get_range, (db_seq_t *minp, db_seq_t *maxp), (seq, minp, maxp), 0)
diff --git a/lang/cxx/cxx_site.cpp b/lang/cxx/cxx_site.cpp
index fca5c9ba..b78095a1 100644
--- a/lang/cxx/cxx_site.cpp
+++ b/lang/cxx/cxx_site.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/lang/cxx/cxx_txn.cpp b/lang/cxx/cxx_txn.cpp
index c5368b74..ac5652c2 100644
--- a/lang/cxx/cxx_txn.cpp
+++ b/lang/cxx/cxx_txn.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/lang/cxx/stl/dbstl_base_iterator.h b/lang/cxx/stl/dbstl_base_iterator.h
index ebe4c565..357e6e2a 100644
--- a/lang/cxx/stl/dbstl_base_iterator.h
+++ b/lang/cxx/stl/dbstl_base_iterator.h
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/lang/cxx/stl/dbstl_container.cpp b/lang/cxx/stl/dbstl_container.cpp
index bf5f527d..25923051 100644
--- a/lang/cxx/stl/dbstl_container.cpp
+++ b/lang/cxx/stl/dbstl_container.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/lang/cxx/stl/dbstl_container.h b/lang/cxx/stl/dbstl_container.h
index 4b6ed701..515d7c3b 100644
--- a/lang/cxx/stl/dbstl_container.h
+++ b/lang/cxx/stl/dbstl_container.h
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/lang/cxx/stl/dbstl_dbc.h b/lang/cxx/stl/dbstl_dbc.h
index c8bdd3b9..7b529ebc 100644
--- a/lang/cxx/stl/dbstl_dbc.h
+++ b/lang/cxx/stl/dbstl_dbc.h
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/lang/cxx/stl/dbstl_dbt.h b/lang/cxx/stl/dbstl_dbt.h
index 3480b3a6..823d0520 100644
--- a/lang/cxx/stl/dbstl_dbt.h
+++ b/lang/cxx/stl/dbstl_dbt.h
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/lang/cxx/stl/dbstl_element_ref.h b/lang/cxx/stl/dbstl_element_ref.h
index d680901b..e657102e 100644
--- a/lang/cxx/stl/dbstl_element_ref.h
+++ b/lang/cxx/stl/dbstl_element_ref.h
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/lang/cxx/stl/dbstl_exception.h b/lang/cxx/stl/dbstl_exception.h
index 4f8c2f8b..ac9aaac7 100644
--- a/lang/cxx/stl/dbstl_exception.h
+++ b/lang/cxx/stl/dbstl_exception.h
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/lang/cxx/stl/dbstl_inner_utility.h b/lang/cxx/stl/dbstl_inner_utility.h
index 01c072c1..6f2b7d51 100644
--- a/lang/cxx/stl/dbstl_inner_utility.h
+++ b/lang/cxx/stl/dbstl_inner_utility.h
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/lang/cxx/stl/dbstl_map.h b/lang/cxx/stl/dbstl_map.h
index 6828787d..288d6264 100644
--- a/lang/cxx/stl/dbstl_map.h
+++ b/lang/cxx/stl/dbstl_map.h
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -55,6 +55,11 @@ class db_set;
template <Typename kdt, Typename value_type_sub = ElementRef<kdt> >
class db_multiset;
+#if NO_MEMBER_FUNCTION_PARTIAL_SPECIALIZATION
+template <Typename kdt, Typename datadt, Typename value_type_sub>
+void assign_second0(pair<kdt, value_type_sub>& v, const datadt& d) ;
+#endif
+
/** \ingroup dbstl_iterators
@{
\defgroup db_map_iterators Iterator classes for db_map and db_multimap.
@@ -696,12 +701,6 @@ assign_second0(value_type &v, const _DB_STL_set_value<kdt>&
//@} // db_map_iterators
//@} // dbstl_iterators
-
-#if NO_MEMBER_FUNCTION_PARTIAL_SPECIALIZATION
-template <Typename kdt, Typename datadt, Typename value_type_sub>
-void assign_second0(pair<kdt, value_type_sub>& v, const datadt& d) ;
-#endif
-
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//
@@ -1191,7 +1190,7 @@ public:
}
bool operator()(const kdt& k1, const kdt& k2) const
{
- return compare_keys(pdb, k1, k2);
+ return compare_keys(pdb, k1, k2, NULL);
}
}; // key_compare class definition
@@ -1273,7 +1272,7 @@ public:
return memcmp(&kk1, &kk2, sizeof(kdt)) == 0;
Dbt kd1(&k1, sizeof(k1)), kd2(&k2, sizeof(k2));
- return comp(pdb, &kd1, &kd2) == 0;
+ return comp(pdb, &kd1, &kd2, NULL) == 0;
}
@@ -2428,12 +2427,13 @@ protected:
typedef ddt mapped_type;
typedef int (*db_compare_fcn_t)(Db *db, const Dbt *dbt1,
- const Dbt *dbt2);
+ const Dbt *dbt2, size_t *locp);
typedef u_int32_t (*h_hash_fcn_t)
(Db *, const void *bytes, u_int32_t length);
typedef db_set_iterator<kdt> db_multiset_iterator_t;
- static bool compare_keys(Db *pdb, const kdt& k1, const kdt& k2)
+ static bool compare_keys(Db *pdb,
+ const kdt& k1, const kdt& k2, size_t *locp)
{
DBTYPE dbtype;
int ret;
@@ -2461,7 +2461,7 @@ protected:
return (ret == 0) ? (sz1 < sz2) : (ret < 0);
}
// Return strict weak ordering.
- bret = (comp(pdb, &kdbt1, &kdbt2) < 0);
+ bret = (comp(pdb, &kdbt1, &kdbt2, NULL) < 0);
return bret;
}
@@ -2676,7 +2676,7 @@ public:
BulkRetrievalOption::BulkRetrieval)))
{
this->init_members(x);
- verify_db_handles(x);
+ this->verify_db_handles(x);
this->set_db_handle_int(this->clone_db_config(
x.get_db_handle()), x.get_db_env_handle());
assert(this->get_db_handle() != NULL);
@@ -2707,7 +2707,7 @@ public:
{
ASSIGNMENT_PREDCOND(x)
db_container::operator =(x);
- verify_db_handles(x);
+ this->verify_db_handles(x);
assert(this->get_db_handle() != NULL);
this->begin_txn();
try {
@@ -2734,8 +2734,8 @@ public:
InputIterator ii;
iterator witr;
- init_itr(witr);
- open_itr(witr);
+ this->init_itr(witr);
+ this->open_itr(witr);
for (ii = first; ii != last; ++ii)
witr.pcsr_->insert(ii->first, ii->second,
@@ -2789,7 +2789,7 @@ public:
Db *swapdb = NULL;
std::string dbfname(64, '\0');
- verify_db_handles(mp);
+ this->verify_db_handles(mp);
this->begin_txn();
try {
swapdb = this->clone_db_config(this->get_db_handle(),
@@ -3205,7 +3205,7 @@ public:
string name1, name2;
u_int32_t oflags;
- verify_db_handles(m2);
+ this->verify_db_handles(m2);
pdb = this->get_db_handle();
penv = pdb->get_env();
try {
@@ -3325,7 +3325,7 @@ protected:
typedef ddt mapped_type;
typedef value_type_sub tkpair;
typedef int (*bt_compare_fcn_t)(Db *db, const Dbt *dbt1,
- const Dbt *dbt2);
+ const Dbt *dbt2, size_t *locp);
friend class db_map_iterator<kdt, _DB_STL_set_value<kdt>,
value_type_sub>;
diff --git a/lang/cxx/stl/dbstl_resource_manager.cpp b/lang/cxx/stl/dbstl_resource_manager.cpp
index 81c131e1..1c22f479 100644
--- a/lang/cxx/stl/dbstl_resource_manager.cpp
+++ b/lang/cxx/stl/dbstl_resource_manager.cpp
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/lang/cxx/stl/dbstl_resource_manager.h b/lang/cxx/stl/dbstl_resource_manager.h
index 6fc968fb..350a37b1 100644
--- a/lang/cxx/stl/dbstl_resource_manager.h
+++ b/lang/cxx/stl/dbstl_resource_manager.h
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/lang/cxx/stl/dbstl_set.h b/lang/cxx/stl/dbstl_set.h
index 5f3be103..998ba496 100644
--- a/lang/cxx/stl/dbstl_set.h
+++ b/lang/cxx/stl/dbstl_set.h
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -658,7 +658,7 @@ public:
BulkRetrievalOption::BulkRetrieval)))
{
this->init_members(x);
- verify_db_handles(x);
+ this->verify_db_handles(x);
this->set_db_handle_int(this->clone_db_config(
x.get_db_handle()), x.get_db_env_handle());
assert(this->get_db_handle() != NULL);
@@ -691,7 +691,7 @@ public:
{
ASSIGNMENT_PREDCOND(x)
db_container::operator =(x);
- verify_db_handles(x);
+ this->verify_db_handles(x);
assert(this->get_db_handle() != NULL);
this->begin_txn();
try {
@@ -722,7 +722,7 @@ public:
}
bool operator()(const kdt& k1, const kdt& k2) const
{
- return compare_keys(pdb, k1, k2);
+ return db_set::compare_keys(pdb, k1, k2, NULL);
}
}; // key_compare class definition
@@ -816,7 +816,6 @@ public:
iterator witr;
this->init_itr(witr);
-
this->open_itr(witr);
for (ii = first; ii != last; ++ii)
@@ -832,8 +831,8 @@ public:
iterator ii, witr;
_DB_STL_set_value<kdt> d;
- init_itr(witr);
- open_itr(witr);
+ this->init_itr(witr);
+ this->open_itr(witr);
for (ii = first; ii != last; ++ii)
witr.pcsr_->insert(*ii, d, DB_KEYLAST);
@@ -866,7 +865,6 @@ public:
iterator witr;
this->init_itr(witr);
-
this->open_itr(witr);
for (ii = first; ii != last; ++ii)
@@ -886,7 +884,7 @@ public:
Db *swapdb = NULL;
std::string dbfname(64, '\0');
- verify_db_handles(mp);
+ this->verify_db_handles(mp);
this->begin_txn();
try {
swapdb = this->clone_db_config(this->get_db_handle(),
@@ -946,7 +944,7 @@ public:
bool ret;
COMPARE_CHECK(m2)
- verify_db_handles(m2);
+ this->verify_db_handles(m2);
const db_set<kdt, value_type_sub>& m1 = *this;
try {
@@ -988,7 +986,7 @@ exit:
protected:
typedef int (*db_compare_fcn_t)(Db *db, const Dbt *dbt1,
- const Dbt *dbt2);
+ const Dbt *dbt2, size_t *locp);
typedef db_map<kdt, _DB_STL_set_value<kdt>, value_type_sub,
@@ -1150,7 +1148,7 @@ public:
BulkRetrievalOption::BulkRetrieval)))
{
this->init_members(x);
- verify_db_handles(x);
+ this->verify_db_handles(x);
this->set_db_handle_int(this->clone_db_config(
x.get_db_handle()), x.get_db_env_handle());
assert(this->get_db_handle() != NULL);
@@ -1188,7 +1186,7 @@ public:
{
ASSIGNMENT_PREDCOND(x)
db_container::operator =(x);
- verify_db_handles(x);
+ this->verify_db_handles(x);
assert(this->get_db_handle() != NULL);
this->begin_txn();
try {
@@ -1275,8 +1273,8 @@ public:
iterator witr;
_DB_STL_set_value<kdt> d;
- init_itr(witr);
- open_itr(witr);
+ this->init_itr(witr);
+ this->open_itr(witr);
for (ii = first; ii != last; ++ii)
witr.pcsr_->insert(*ii, d, DB_KEYLAST);
@@ -1299,8 +1297,8 @@ public:
iterator witr;
_DB_STL_set_value<kdt> d;
- init_itr(witr);
- open_itr(witr);
+ this->init_itr(witr);
+ this->open_itr(witr);
for (ii = first; ii != last; ++ii)
witr.pcsr_->insert(*ii, d, DB_KEYLAST);
@@ -1326,7 +1324,7 @@ public:
this->begin_txn();
try {
- pair<iterator, iterator> rg = equal_range(x);
+ pair<iterator, iterator> rg = this->equal_range(x);
for (itr = rg.first, cnt = 0;
itr != rg.second; ++itr) {
cnt++;
@@ -1383,7 +1381,7 @@ public:
Db *swapdb = NULL;
std::string dbfname(64, '\0');
- verify_db_handles(mp);
+ this->verify_db_handles(mp);
this->begin_txn();
try {
swapdb = this->clone_db_config(this->get_db_handle(),
@@ -1440,7 +1438,7 @@ public:
bool operator==(const self& m2) const
{
COMPARE_CHECK(m2)
- verify_db_handles(m2);
+ this->verify_db_handles(m2);
const db_multiset<kdt, value_type_sub> &m1 = *this;
const_iterator i1, i11;
@@ -1501,7 +1499,7 @@ exit:
protected:
typedef int (*db_compare_fcn_t)(Db *db, const Dbt *dbt1,
- const Dbt *dbt2);
+ const Dbt *dbt2, size_t *locp);
typedef db_multimap<kdt, _DB_STL_set_value<kdt>,
value_type_sub, db_set_iterator<kdt, value_type_sub> > base;
diff --git a/lang/cxx/stl/dbstl_utility.h b/lang/cxx/stl/dbstl_utility.h
index 63b661e9..e97857cd 100644
--- a/lang/cxx/stl/dbstl_utility.h
+++ b/lang/cxx/stl/dbstl_utility.h
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/lang/cxx/stl/dbstl_vector.h b/lang/cxx/stl/dbstl_vector.h
index 968b7427..9a5f7f28 100644
--- a/lang/cxx/stl/dbstl_vector.h
+++ b/lang/cxx/stl/dbstl_vector.h
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -856,7 +856,7 @@ public:
/// \sa db_vector_base_iterator::operator++()
inline self& operator++()
{
- move_by(*this, 1, false);
+ this->move_by(*this, 1, false);
return *this;
}
@@ -866,7 +866,7 @@ public:
inline self operator++(int)
{
self itr(*this);
- move_by(*this, 1, false);
+ this->move_by(*this, 1, false);
return itr;
}
@@ -876,7 +876,7 @@ public:
/// \sa db_vector_base_iterator::operator--()
inline self& operator--()
{
- move_by(*this, 1, true);
+ this->move_by(*this, 1, true);
return *this;
}
@@ -886,7 +886,7 @@ public:
inline self operator--(int)
{
self itr = *this;
- move_by(*this, 1, true);
+ this->move_by(*this, 1, true);
return itr;
}
@@ -919,7 +919,7 @@ public:
inline self operator+(difference_type n) const
{
self itr(*this);
- move_by(itr, n, false);
+ this->move_by(itr, n, false);
return itr;
}
@@ -930,7 +930,7 @@ public:
/// \sa db_vector_base_iterator::operator+=(difference_type n)
inline const self& operator+=(difference_type n)
{
- move_by(*this, n, false);
+ this->move_by(*this, n, false);
return *this;
}
@@ -945,7 +945,7 @@ public:
inline self operator-(difference_type n) const
{
self itr(*this);
- move_by(itr, n);
+ this->move_by(itr, n);
return itr;
}
@@ -957,7 +957,7 @@ public:
/// \sa db_vector_base_iterator::operator-=(difference_type n)
inline const self& operator-=(difference_type n)
{
- move_by(*this, n);
+ this->move_by(*this, n);
return *this;
}
//@} // itr_movement