]> git.vpit.fr Git - perl/modules/subs-auto.git/commitdiff
Preemptively remove uses of lvalue GvCV rt65000
authorVincent Pit <vince@profvince.com>
Wed, 5 Jan 2011 20:10:52 +0000 (21:10 +0100)
committerVincent Pit <vince@profvince.com>
Wed, 5 Jan 2011 20:10:52 +0000 (21:10 +0100)
auto.xs

diff --git a/auto.xs b/auto.xs
index 35439a09407b763693aa80a1825d782b55a45d11..a9b2733910b1e37aa5de731ba8cf3373f5ddc6a1 100644 (file)
--- a/auto.xs
+++ b/auto.xs
@@ -6,6 +6,10 @@
 #include "perl.h"
 #include "XSUB.h"
 
+#ifndef GvCV_set
+# define GvCV_set(G, C) (GvCV(G) = (C))
+#endif
+
 MODULE = subs::auto      PACKAGE = subs::auto
 
 PROTOTYPES: ENABLE
@@ -18,7 +22,7 @@ PPCODE:
  gv = gv_fetchsv(fqn, 0, 0);
  if (gv) {
   CV *cv = GvCV(gv);
-  GvCV(gv) = NULL;
+  GvCV_set(gv, NULL);
   SvREFCNT_dec(cv);
  }
  XSRETURN(0);