From: Vincent Pit Date: Wed, 7 Aug 2013 16:47:16 +0000 (-0300) Subject: Remove lvalue uses of GvCV() X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=2a7be132e108585407533a4718f0fc89a4458c8f;p=perl%2Fmodules%2FSub-Op.git Remove lvalue uses of GvCV() --- diff --git a/Op.xs b/Op.xs index b5417de..44e0916 100644 --- a/Op.xs +++ b/Op.xs @@ -13,6 +13,10 @@ #define SO_HAS_PERL(R, V, S) (PERL_REVISION > (R) || (PERL_REVISION == (R) && (PERL_VERSION > (V) || (PERL_VERSION == (V) && (PERL_SUBVERSION >= (S)))))) +#ifndef GvCV_set +# define GvCV_set(G, C) (GvCV(G) = (C)) +#endif + /* ... Thread safety and multiplicity ...................................... */ #ifndef SO_MULTIPLICITY @@ -284,7 +288,7 @@ STATIC OP *so_ck_entersub(pTHX_ OP *o) { if (gv && SvTYPE(gv) >= SVt_PVGV && (cv = GvCV(gv)) == MY_CXT.placeholder) { SvREFCNT_dec(cv); - GvCV(gv) = NULL; + GvCV_set(gv, NULL); } if (c->call) @@ -389,7 +393,7 @@ STATIC OP *so_ck_gelem(pTHX_ OP *o) { if (gv && SvTYPE(gv) >= SVt_PVGV && (cv = GvCV(gv)) == MY_CXT.placeholder) { SvREFCNT_dec(cv); - GvCV(gv) = NULL; + GvCV_set(gv, NULL); } } }