From: Vincent Pit Date: Wed, 5 Jan 2011 20:06:54 +0000 (+0100) Subject: Preemptively remove uses of lvalue GvCV X-Git-Tag: rt64997~3 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=80ef65b1f1c9637151dd5fafbf9a590b4ead4e4d;p=perl%2Fmodules%2FScope-Upper.git Preemptively remove uses of lvalue GvCV --- diff --git a/Upper.xs b/Upper.xs index b3f6e4e..682aa87 100644 --- a/Upper.xs +++ b/Upper.xs @@ -48,6 +48,10 @@ # define SvREFCNT_inc_simple_void(sv) SvREFCNT_inc(sv) #endif +#ifndef GvCV_set +# define GvCV_set(G, C) (GvCV(G) = (C)) +#endif + #ifndef HvNAME_get # define HvNAME_get(H) HvNAME(H) #endif @@ -546,7 +550,7 @@ STATIC void su_localize(pTHX_ void *ud_) { break; case SVt_PVCV: SAVESPTR(GvCV(gv)); - GvCV(gv) = NULL; + GvCV_set(gv, NULL); break; default: gv = (GV *) save_scalar(gv);