|
From: Jeremy F. <je...@go...> - 2002-10-30 16:07:06
|
On Wed, 2002-10-30 at 02:31, Nicholas Nethercote wrote:
Thinking about this some more, seems to me like every skin is going to
identically do:
details->core_interface = VG_IF_VERSION;
In which case why not just put:
const Char* core_interface = VG_IF_VERSION;
[ Well, SK_(core_interface) ]. Yes, that would work.
in vg_skin.h, which every skin #includes. That way, the skin doesn't have
to mention anything about version numbers, and assuming we get the X.Y
binary (in)compatibility numbering right, everything will work as desired.
(Thinking some more: it would be better to have VG_MINOR_IF_VERSION and
VG_MAJOR_IF_VERSION integers rather than a string, just to make
comparisons simpler.)
Yes, then you can do CPP checking:
#if VG_MAJOR_IF_VERSION < 3
#error Need Valgrind version 3
#endif
And not expose the fields of the struct in vg_skin.h. That way even if the
structs were totally reordered in core, an old skin would still work fine
with it.
Yes, that would be better. A little more cumbersome, but it could be
prettied up with a macro perhaps.
J
|