]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Allow building with perl 5.14.
authorAndrew Dunstan <andrew@dunslane.net>
Sat, 4 Jun 2011 23:37:50 +0000 (19:37 -0400)
committerAndrew Dunstan <andrew@dunslane.net>
Sat, 4 Jun 2011 23:37:50 +0000 (19:37 -0400)
Patch from Alex Hunsaker.

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

index d3b86533ece08d36a98ea8b71c33d9b13d59aac0..64a4fd45d603259a5b6715a14c128c29ff6f2d22 100644 (file)
@@ -687,7 +687,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 c8aa185a3b64c3d2fe1c0b668b49af63a3b36910..48828b60236e3a1f595687a7f64d49fc8a7ef0db 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);