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 reply to Re^3: XS: how to destroy HV* that was used internally?
by ikegami
in thread XS: how to destroy HV* that was used internally?
by OlegG
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |