Skip to content

Commit 8287c4f

Browse files
committed
Allow building with perl 5.14.
Patch from Alex Hunsaker.
1 parent 28395db commit 8287c4f

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
@@ -685,7 +685,7 @@ plperl_trusted_init(void)
685685
if (!isGV_with_GP(sv) || !GvCV(sv))
686686
continue;
687687
SvREFCNT_dec(GvCV(sv)); /* free the CV */
688-
GvCV(sv) = NULL; /* prevent call via GV */
688+
GvCV_set(sv, NULL); /* prevent call via GV */
689689
}
690690
hv_clear(stash);
691691
/* invalidate assorted caches */

src/pl/plperl/plperl.h

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

46+
/* supply GvCV_set if it's missing - ppport.h doesn't supply it, unfortunately */
47+
#ifndef GvCV_set
48+
#define GvCV_set(gv, cv) (GvCV(gv) = cv)
49+
#endif
50+
4651
/* routines from spi_internal.c */
4752
int spi_DEBUG(void);
4853
int spi_LOG(void);

0 commit comments

Comments
 (0)