From: Vincent Pit Date: Mon, 18 Jan 2010 21:40:18 +0000 (+0100) Subject: Use SvREFCNT_inc_simple_void() whenever possible X-Git-Tag: v0.10~6 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=625f57f60131dbb27d306e993cbfb97aceda2489;p=perl%2Fmodules%2FScope-Upper.git Use SvREFCNT_inc_simple_void() whenever possible --- diff --git a/Upper.xs b/Upper.xs index 8908385..7a2a79a 100644 --- a/Upper.xs +++ b/Upper.xs @@ -44,6 +44,10 @@ # define SvPV_nolen_const(S) SvPV_nolen(S) #endif +#ifndef SvREFCNT_inc_simple_void +# define SvREFCNT_inc_simple_void(sv) SvREFCNT_inc(sv) +#endif + #ifndef HvNAME_get # define HvNAME_get(H) HvNAME(H) #endif @@ -176,7 +180,7 @@ STATIC void su_save_adelete(pTHX_ AV *av, I32 idx) { Newx(ud, 1, su_ud_adelete); ud->av = av; ud->idx = idx; - SvREFCNT_inc(av); + SvREFCNT_inc_simple_void(av); SAVEDESTRUCTOR_X(su_adelete, ud); } @@ -352,7 +356,7 @@ STATIC void su_ud_localize_init(pTHX_ su_ud_localize *ud, SV *sv, SV *val, SV *e UV deref = 0; svtype t = SVt_NULL; - SvREFCNT_inc(sv); + SvREFCNT_inc_simple_void(sv); if (SvTYPE(sv) >= SVt_PVGV) { if (!val || !SvROK(val)) { /* local *x; or local *x = $val; */