Allow building with perl 5.14.
authorAndrew Dunstan <andrew@dunslane.net>
Sat, 4 Jun 2011 23:35:04 +0000 (19:35 -0400)
committerAndrew Dunstan <andrew@dunslane.net>
Sat, 4 Jun 2011 23:35:04 +0000 (19:35 -0400)
Patch from Alex Hunsaker.

src/pl/plperl/plperl.c
src/pl/plperl/plperl.h

index 72c4dc271b4f59a47861adf3169f71852b5ac85e..17544893efb86d12eac1612e0e4fdbd4f222fe1d 100644 (file)
@@ -874,7 +874,7 @@ plperl_trusted_init(void)
                if (!isGV_with_GP(sv) || !GvCV(sv))
                        continue;
                SvREFCNT_dec(GvCV(sv)); /* free the CV */
-               GvCV(sv) = NULL;                /* prevent call via GV */
+               GvCV_set(sv, NULL);             /* prevent call via GV */
        }
        hv_clear(stash);
 
index 6d58f117ca128f1844d3b0fea323d08180c76ac0..1d38d9e6f0a27a4aaf5d7c281bb4b09b86a2265b 100644 (file)
 #undef bool
 #endif
 
+/* supply GvCV_set if it's missing - ppport.h doesn't supply it, unfortunately */
+#ifndef GvCV_set
+#define GvCV_set(gv, cv)               (GvCV(gv) = cv)
+#endif
+
 /* declare routines from plperl.c for access by .xs files */
 HV                *plperl_spi_exec(char *, int);
 void           plperl_return_next(SV *);