]> git.vpit.fr Git - perl/modules/Scope-Upper.git/commitdiff
Preemptively remove uses of lvalue GvCV
authorVincent Pit <vince@profvince.com>
Wed, 5 Jan 2011 20:06:54 +0000 (21:06 +0100)
committerVincent Pit <vince@profvince.com>
Wed, 5 Jan 2011 20:09:46 +0000 (21:09 +0100)
Upper.xs

index b3f6e4eaf297845dcac4e206d4d669e16e3f058e..682aa879f12664483e6d157a5aaeb5d81d32e3b1 100644 (file)
--- a/Upper.xs
+++ b/Upper.xs
 # 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);