BIND 10 trac2207, updated. 4601f7ef87135a559b4fa7a1daaf2f1de8f040c3 [2207] The parameter of local writer is Local as well
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed Oct 17 10:53:51 UTC 2012
The branch, trac2207 has been updated
via 4601f7ef87135a559b4fa7a1daaf2f1de8f040c3 (commit)
from 84e0dc1be1b2f22d46028944a3ce1a599aa24090 (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 4601f7ef87135a559b4fa7a1daaf2f1de8f040c3
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date: Wed Oct 17 12:49:49 2012 +0200
[2207] The parameter of local writer is Local as well
But the benefit of this change is questionable.
-----------------------------------------------------------------------
Summary of changes:
src/lib/datasrc/memory/zone_writer_local.cc | 4 ++--
src/lib/datasrc/memory/zone_writer_local.h | 9 +++++----
.../datasrc/tests/memory/zone_writer_unittest.cc | 10 +++++-----
3 files changed, 12 insertions(+), 11 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/memory/zone_writer_local.cc b/src/lib/datasrc/memory/zone_writer_local.cc
index f8e68c8..0bccdc1 100644
--- a/src/lib/datasrc/memory/zone_writer_local.cc
+++ b/src/lib/datasrc/memory/zone_writer_local.cc
@@ -14,7 +14,7 @@
#include "zone_writer_local.h"
#include "zone_data.h"
-#include "zone_table_segment.h"
+#include "zone_table_segment_local.h"
#include <memory>
@@ -24,7 +24,7 @@ namespace isc {
namespace datasrc {
namespace memory {
-ZoneWriterLocal::ZoneWriterLocal(ZoneTableSegment* segment,
+ZoneWriterLocal::ZoneWriterLocal(ZoneTableSegmentLocal* segment,
const LoadAction& load_action,
const dns::Name& origin,
const dns::RRClass& rrclass) :
diff --git a/src/lib/datasrc/memory/zone_writer_local.h b/src/lib/datasrc/memory/zone_writer_local.h
index a670c1f..c0f51ed 100644
--- a/src/lib/datasrc/memory/zone_writer_local.h
+++ b/src/lib/datasrc/memory/zone_writer_local.h
@@ -25,7 +25,7 @@ namespace datasrc {
namespace memory {
class ZoneData;
-class ZoneTableSegment;
+class ZoneTableSegmentLocal;
/// \brief Writer implementation which loads data locally.
///
@@ -41,8 +41,9 @@ public:
/// \param load_action The callback used to load data.
/// \param install_action The callback used to install the loaded zone.
/// \param rrclass The class of the zone.
- ZoneWriterLocal(ZoneTableSegment* segment, const LoadAction& load_action,
- const dns::Name& name, const dns::RRClass& rrclass);
+ ZoneWriterLocal(ZoneTableSegmentLocal* segment,
+ const LoadAction& load_action, const dns::Name& name,
+ const dns::RRClass& rrclass);
/// \brief Destructor
~ZoneWriterLocal();
@@ -73,7 +74,7 @@ public:
/// the old zone replaced by install().
virtual void cleanup();
private:
- ZoneTableSegment* segment_;
+ ZoneTableSegmentLocal* segment_;
LoadAction load_action_;
dns::Name origin_;
dns::RRClass rrclass_;
diff --git a/src/lib/datasrc/tests/memory/zone_writer_unittest.cc b/src/lib/datasrc/tests/memory/zone_writer_unittest.cc
index 71bf185..dea093b 100644
--- a/src/lib/datasrc/tests/memory/zone_writer_unittest.cc
+++ b/src/lib/datasrc/tests/memory/zone_writer_unittest.cc
@@ -13,7 +13,7 @@
// PERFORMANCE OF THIS SOFTWARE.
#include <datasrc/memory/zone_writer_local.h>
-#include <datasrc/memory/zone_table_segment.h>
+#include <datasrc/memory/zone_table_segment_local.h>
#include <datasrc/memory/zone_data.h>
#include <cc/data.h>
@@ -43,10 +43,10 @@ public:
// (which is currently ignored)
segment_(ZoneTableSegment::create(isc::data::NullElement())),
writer_(new
- ZoneWriterLocal(segment_.get(),
- bind(&ZoneWriterLocalTest::loadAction, this,
- _1),
- Name("example.org"), RRClass::IN())),
+ ZoneWriterLocal(dynamic_cast<ZoneTableSegmentLocal*>(segment_.
+ get()),
+ bind(&ZoneWriterLocalTest::loadAction, this, _1),
+ Name("example.org"), RRClass::IN())),
load_called_(false),
load_throw_(false),
load_null_(false)
More information about the bind10-changes
mailing list