# define SvRV_const(sv) SvRV((SV *) sv)
#endif
+#ifndef SvREFCNT_inc_simple_void
+# define SvREFCNT_inc_simple_void(sv) SvREFCNT_inc(sv)
+#endif
+
#ifndef mPUSHu
# define mPUSHu(U) PUSHs(sv_2mortal(newSVuv(U)))
#endif
SPAGAIN;
nsv = POPs;
#if VMG_HAS_PERL(5, 8, 3)
- SvREFCNT_inc(nsv); /* Or it will be destroyed in FREETMPS */
+ SvREFCNT_inc_simple_void(nsv); /* Or it will be destroyed in FREETMPS */
#else
- nsv = sv_newref(nsv); /* Workaround some bug in SvREFCNT_inc() */
+ nsv = sv_newref(nsv); /* Workaround some bug in SvREFCNT_inc() */
#endif
PUTBACK;
w = vmg_wizard_mgwiz(mg->mg_ptr);
/* So that it survives the temp cleanup below */
- SvREFCNT_inc(sv);
+ SvREFCNT_inc_simple_void(sv);
#if !VMG_HAS_PERL_MAINT(5, 11, 0, 32686)
/* The previous magic tokens were freed but the magic chain wasn't updated, so