Added
Link Here
|
1 |
Obtained from: http://archives.postgresql.org/pgsql-hackers/2011-04/msg01283.php |
2 |
Reference: http://search.cpan.org/~jesse/perl-5.14.0/pod/perldelta.pod#GvCV()_and_GvGP()_are_no_longer_lvalues |
3 |
|
4 |
--- src/pl/plperl/plperl.c.orig 2011-04-15 11:15:53.000000000 +0800 |
5 |
+++ src/pl/plperl/plperl.c 2011-05-19 20:39:34.126713700 +0800 |
6 |
@@ -874,7 +874,7 @@ |
7 |
if (!isGV_with_GP(sv) || !GvCV(sv)) |
8 |
continue; |
9 |
SvREFCNT_dec(GvCV(sv)); /* free the CV */ |
10 |
- GvCV(sv) = NULL; /* prevent call via GV */ |
11 |
+ GvCV_set(sv, NULL); /* prevent call via GV */ |
12 |
} |
13 |
hv_clear(stash); |
14 |
|
15 |
--- src/pl/plperl/plperl.h.orig 2011-04-15 11:15:53.000000000 +0800 |
16 |
+++ src/pl/plperl/plperl.h 2011-05-19 20:39:34.127713548 +0800 |
17 |
@@ -42,6 +42,11 @@ |
18 |
#undef bool |
19 |
#endif |
20 |
|
21 |
+/* supply GvCV_set if it's missing - ppport.h doesn't supply it, unfortunately */ |
22 |
+#ifndef GvCV_set |
23 |
+#define GvCV_set(gv, cv) (GvCV(gv) = cv) |
24 |
+#endif |
25 |
+ |
26 |
/* declare routines from plperl.c for access by .xs files */ |
27 |
HV *plperl_spi_exec(char *, int); |
28 |
void plperl_return_next(SV *); |