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

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

index 82464e59ced47ad752947eb06106fc978868dc1b..7206e2e2da74c8a537a82a727d8891e49269f5c2 100644 (file)
@@ -685,7 +685,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);
        /* invalidate assorted caches */
index 5a93f15ccf3fd83f4dd785f1f03067f100b1cec4..08aba48df85dc7a117c8519e42c7cd3bcf1c3cfe 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
+
 /* routines from spi_internal.c */
 int                    spi_DEBUG(void);
 int                    spi_LOG(void);