SV* set_parent(SV* self, SV* parent) { ((Node*)SvIV(SvRV(self)))->parent = parent; SvREFCNT_inc(self); return self; }