BIND 10 #2433: implement validateZone, base part
BIND 10 Development
do-not-reply at isc.org
Fri Jan 4 23:15:42 UTC 2013
#2433: implement validateZone, base part
-------------------------------------+-------------------------------------
Reporter: jinmei | Owner:
Type: task | vorner
Priority: medium | Status:
Component: libdns++ | reviewing
Keywords: | Milestone:
Sensitive: 0 | Sprint-20130108
Sub-Project: DNS | Resolution:
Estimated Difficulty: 4 | CVSS Scoring:
Total Hours: 0 | Defect Severity: N/A
| Feature Depending on Ticket:
| loadzone-ng
| Add Hours to Ticket: 1.82
| Internal?: 0
-------------------------------------+-------------------------------------
Comment (by jinmei):
Replying to [comment:18 jinmei]:
> Regarding the former...hmm, the reason why we needed copies is
> error()/warn() was non const member functions, and you changed them to
> const. They were non const, following `MasterLoaderCallbacks`; the
> data source loader needed to have them non const. If we need to
> expect the same situation, we'll have to keep these callback methods
> non const, too, and, as a result, we need to accept the copy of the
> functors.
>
> I don't have a strong opinion, but am inclined to keep them non const
> as it once happened. I believe the cost of the copy is acceptable in
> this context.
As discussed on jabber, we can actually handle all these callback
functors as const. We needed to make error/warn non const when they
were in a derived class of the datasrc library, but that approach was
canceled and the restriction doesn't apply. Technically, it may be
debatable if it's really clean because the functor object may
internally hold a state of its user which may be modified on
operator() (and it should actually be the case for datasrc). Even
though compilers don't complain (because they are hidden via pointers
or references), we effectively change its internal.
But, for now, I made all of them const for consistency. If it doesn't
cause additional discussion, I'll merge this version of branch (once
#2432 is merged).
--
Ticket URL: <http://bind10.isc.org/ticket/2433#comment:20>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list