Skip to content

Commit cb252c2

Browse files
committed
Allow building with perl 5.14.
Patch from Alex Hunsaker.
1 parent 39dbc62 commit cb252c2

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/pl/plperl/plperl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ plperl_trusted_init(void)
874874
if (!isGV_with_GP(sv) || !GvCV(sv))
875875
continue;
876876
SvREFCNT_dec(GvCV(sv)); /* free the CV */
877-
GvCV(sv) = NULL; /* prevent call via GV */
877+
GvCV_set(sv, NULL); /* prevent call via GV */
878878
}
879879
hv_clear(stash);
880880

src/pl/plperl/plperl.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@
4242
#undef bool
4343
#endif
4444

45+
/* supply GvCV_set if it's missing - ppport.h doesn't supply it, unfortunately */
46+
#ifndef GvCV_set
47+
#define GvCV_set(gv, cv) (GvCV(gv) = cv)
48+
#endif
49+
4550
/* declare routines from plperl.c for access by .xs files */
4651
HV *plperl_spi_exec(char *, int);
4752
void plperl_return_next(SV *);

0 commit comments

Comments
 (0)