BIND 10 #2106: allow RBTree::find to take LabelSequence

BIND 10 Development do-not-reply at isc.org
Sun Jul 29 20:08:58 UTC 2012


#2106: allow RBTree::find to take LabelSequence
-------------------------------------+-------------------------------------
                   Reporter:         |                 Owner:  muks
  jinmei                             |                Status:  reviewing
                       Type:  task   |             Milestone:
                   Priority:         |  Sprint-20120731
  medium                             |            Resolution:
                  Component:  data   |             Sensitive:  0
  source                             |           Sub-Project:  DNS
                   Keywords:         |  Estimated Difficulty:  3
            Defect Severity:  N/A    |           Total Hours:  0
Feature Depending on Ticket:         |
  scalable inmemory                  |
        Add Hours to Ticket:  0      |
                  Internal?:  0      |
-------------------------------------+-------------------------------------

Comment (by muks):

 Replying to [comment:8 jinmei]:
 > A couple of more minor things:
 > - I'd omit defining a variable `result`:
 > {{{
 >     //const LabelSequence ls(name); => ls is only used here
 >     const DomainTree::Result result =
 >         domains_.find(LabelSequence(name), &node, node_path,
 cutCallback,
 >                       &state);
 > }}}
 >   but that may be a matter of taste.

 This has been implemented now.

 > - it seems callbackName and callbackLabelSequence can be merged:
 > {{{
 > TEST_F(RBTreeTest, callback) {
 >     const Name n1("sub.callback.example");
 >     const Name n2("callback.example");
 >     const LabelSequence ls1(n1);
 >     const LabelSequence ls2(n2);
 >
 >     performCallbackTest(rbtree, mem_sgmt_, n1, n2); // with Names
 >     performCallbackTest(rbtree, mem_sgmt_, ls1, ls2); // with
 LabelSequences
 > }
 > }}}
 >  but I'd leave it to you, too.

 It can't be, as `performCallbackTest()` modifies the data (the second test
 needs the fixture to be re-created).

-- 
Ticket URL: <http://bind10.isc.org/ticket/2106#comment:10>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list