summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-07-07 17:35:10 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-09-15 22:44:59 -0700
commitb290562ef436d5316a2f75513def7f4f18c4ef34 (patch)
treecf17255810711fb72c2702959076b99265b56068 /ext
parent97b03d64e557578d3dbfeb6e6ca37ba57d57e858 (diff)
downloadperl-b290562ef436d5316a2f75513def7f4f18c4ef34.tar.gz
Allow CVs to point to HEKs rather than GVs
This will allow named lexical subs to exist independent of GVs.
Diffstat (limited to 'ext')
-rw-r--r--ext/B/B.xs6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/B/B.xs b/ext/B/B.xs
index 69c4aaed7b..ad839b5a2b 100644
--- a/ext/B/B.xs
+++ b/ext/B/B.xs
@@ -1452,7 +1452,11 @@ MODULE = B PACKAGE = B::IV
#define PVAV_max_ix sv_SSize_tp | offsetof(struct xpvav, xav_max)
#define PVCV_stash_ix sv_SVp | offsetof(struct xpvcv, xcv_stash)
-#define PVCV_gv_ix sv_SVp | offsetof(struct xpvcv, xcv_gv)
+#if PERL_VERSION > 17 || (PERL_VERSION == 17 && PERL_SUBVERSION >= 3)
+# define PVCV_gv_ix sv_SVp | offsetof(struct xpvcv, xcv_gv_u.xcv_gv)
+#else
+# define PVCV_gv_ix sv_SVp | offsetof(struct xpvcv, xcv_gv)
+#endif
#define PVCV_file_ix sv_char_pp | offsetof(struct xpvcv, xcv_file)
#define PVCV_outside_ix sv_SVp | offsetof(struct xpvcv, xcv_outside)
#define PVCV_outside_seq_ix sv_U32p | offsetof(struct xpvcv, xcv_outside_seq)