quote dituri:
> Before I write the acceptance test I'd like to phone the language lawyers on const VarRef* const and the const-cast-away in VarRefDestroy()... namely, does this result in Undefined Behavior? 

I was originally concerned that this casting-away of the const _before_ the * resulted in Undefined Behavior... I belive the answer to that question is: yes, Undefined Behavior.
("[Do not cast away a const qualifaction](https://www.securecoding.cert.org/confluence/display/seccode/EXP05-C.+Do+not+cast+away+a+const+qualification)", cert.org secure coding which references c99 standard)

In any event, I definitely need to address what you point out.