BIND 10 #1883: define tp_hash for some basic isc.dns classes
BIND 10 Development
do-not-reply at isc.org
Fri Jul 6 21:24:43 UTC 2012
#1883: define tp_hash for some basic isc.dns classes
-------------------------------------+-------------------------------------
Reporter: | Owner: jinmei
jinmei | Status: reviewing
Type: task | Milestone:
Priority: high | Sprint-20120717
Component: | Resolution:
libdns++ | Sensitive: 0
Keywords: | Sub-Project: DNS
Defect Severity: N/A | Estimated Difficulty: 5
Feature Depending on Ticket: | Total Hours: 0
Add Hours to Ticket: 0 |
Internal?: 0 |
-------------------------------------+-------------------------------------
Comment (by jinmei):
Replying to [comment:8 jelte]:
> My compiler (gcc 4.6) is being a PITA and fails on that code;
Ah, I was slightly afraid about that kind of failure. I'm not sure if
it's a compiler "bug", but in any case we need some workaround.
> So far the only workaround I've come up with is to replace it by a
variable;
[...]
> But both these 'solutions' are quite ugly...
I've been trying to find a cleaner solution, but couldn't come up with
anything obviously better either.
One possible compromise is to use the wrapper only for the case of
`Name` (and simplifies the converter function focusing on that
specific case), as the implicit conversion is actually safe for the
other cases. But I guess the not-so-clear constraint of excluding -1
can really bite us if and when we support tp_hash for some other
classes, so I relatively prefer providing a generic wrapper from the
beginning even if it's less clean.
I've committed a slightly different version of your suggested change.
I don't seem to have easy access to the version of g++ that triggers
this warning, so I'm not sure if it really compiles thought. I'm also
not sure if hash_val_bits cannot be const. If you also agree on
providing a generic wrapper, could you confirm these? If you'd rather
prefer a minimalist approach and only convert the `Name` hash for now,
that's okay for me too.
--
Ticket URL: <http://bind10.isc.org/ticket/1883#comment:9>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list