BIND 10 trac3015, updated. e5b3471d579937f19e446f8a380464e0fc059567 [3015] Added Notes about the use of int64_t, long long, long and int
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed Aug 7 09:57:59 UTC 2013
The branch, trac3015 has been updated
via e5b3471d579937f19e446f8a380464e0fc059567 (commit)
from 1176cc4839f9813cd49733a077715b5b2a767f8a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e5b3471d579937f19e446f8a380464e0fc059567
Author: Kazunori Fujiwara <fujiwara at wide.ad.jp>
Date: Wed Aug 7 18:56:42 2013 +0900
[3015] Added Notes about the use of int64_t, long long, long and int
-----------------------------------------------------------------------
Summary of changes:
src/lib/cc/data.h | 15 +++++++++++++++
1 file changed, 15 insertions(+)
-----------------------------------------------------------------------
diff --git a/src/lib/cc/data.h b/src/lib/cc/data.h
index ca1c5ef..8050607 100644
--- a/src/lib/cc/data.h
+++ b/src/lib/cc/data.h
@@ -166,6 +166,8 @@ public:
/// the right type. Set the value and return true if the Elements
/// is of the correct type
///
+ /// Notes: Read notes of IntElement definition about the use of
+ /// long long int, long int and int.
//@{
virtual bool setValue(const long long int v);
bool setValue(const long int i) { return (setValue(static_cast<long long int>(i))); };
@@ -273,6 +275,9 @@ public:
/// underlying system).
/// (Note that that is different from an NullElement, which
/// represents an empty value, and is created with Element::create())
+ ///
+ /// Notes: Read notes of IntElement definition about the use of
+ /// long long int, long int and int.
//@{
static ElementPtr create();
static ElementPtr create(const long long int i);
@@ -373,6 +378,16 @@ public:
//@}
};
+/// Notes: IntElement type is changed to int64_t.
+/// Due to C++ problems on overloading and automatic type conversion,
+/// (C++ tries to convert integer type values and reference/pointer
+/// if value types do not match exactly)
+/// We decided the storage as int64_t,
+/// three (long long, long, int) override function defintions
+/// and cast int/long/long long to int64_t via long long.
+/// Therefore, call by value methods (create, setValue) have three
+/// (int,long,long long) definitions. Others use int64_t.
+///
class IntElement : public Element {
int64_t i;
private:
More information about the bind10-changes
mailing list