aboutsummaryrefslogtreecommitdiffstats
path: root/databases/postgresql83-server/files/patch-src-plperl-plperl
blob: fc67e6e82be52b9d09c029059e3db8ce8c9e5363 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Obtained from:  http://archives.postgresql.org/pgsql-hackers/2011-04/msg01283.php
Reference:  http://search.cpan.org/~jesse/perl-5.14.0/pod/perldelta.pod#GvCV()_and_GvGP()_are_no_longer_lvalues

--- src/pl/plperl/plperl.c.orig 2011-04-15 11:15:53.000000000 +0800
+++ src/pl/plperl/plperl.c  2011-05-19 20:39:34.126713700 +0800
@@ -685,7 +685,7 @@
        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);
 
--- src/pl/plperl/plperl.h.orig 2011-04-15 11:15:53.000000000 +0800
+++ src/pl/plperl/plperl.h  2011-05-19 20:39:34.127713548 +0800
@@ -43,6 +43,11 @@
 #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);