Do you know where your variables are? | |
PerlMonks |
Re^3: XS: how to destroy HV* that was used internally?by ikegami (Patriarch) |
on Sep 18, 2014 at 14:07 UTC ( [id://1101056]=note: print w/replies, xml ) | Need Help?? |
That's because SvREFCNT_dec already casts for you. In fact, it casts in a way that will detect if the input was const, so doing SvREFCNT_dec((SV*)hv) instead of SvREFCNT_dec(hv) is actually harmful. If you ever use (SV*)x, consider using MUTABLE_SV(x) instead.
In Section
Seekers of Perl Wisdom
|
|