summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-05-17 10:26:49 +0100
committerNicholas Clark <nick@ccl4.org>2011-06-11 09:40:02 +0200
commitced454951435adad2176a9e62dc76e463b1a6406 (patch)
tree8d53fc7bcad884a003d40ec69fb51784934d2c11 /ext
parentcffe132d3937f3dc01397f5375d368ad39d53ab7 (diff)
downloadperl-ced454951435adad2176a9e62dc76e463b1a6406.tar.gz
Abolish xbm_rare. Move BmUSEFUL() to union _xnvu and BmPREVIOUS() to the UV.
This reduces the complexity of the union declarations in sv.h. As B.xs is accessing the structures/unions directly, instead of using the macros, it needs a patch too.
Diffstat (limited to 'ext')
-rw-r--r--ext/B/B.xs5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/B/B.xs b/ext/B/B.xs
index f4d5fea10d..1ca4fd8d99 100644
--- a/ext/B/B.xs
+++ b/ext/B/B.xs
@@ -1370,8 +1370,13 @@ MODULE = B PACKAGE = B::IV
#define PVMG_stash_ix sv_SVp | offsetof(struct xpvmg, xmg_stash)
#if PERL_VERSION >= 10
+# if PERL_VERSION > 14
+# define PVBM_useful_ix sv_I32p | offsetof(struct xpvgv, xnv_u.xbm_s.xbm_useful)
+# define PVBM_previous_ix sv_UVp | offsetof(struct xpvuv, xuv_uv)
+# else
#define PVBM_useful_ix sv_I32p | offsetof(struct xpvgv, xiv_u.xivu_i32)
#define PVBM_previous_ix sv_U32p | offsetof(struct xpvgv, xnv_u.xbm_s.xbm_previous)
+# endif
#define PVBM_rare_ix sv_U8p | offsetof(struct xpvgv, xnv_u.xbm_s.xbm_rare)
#else
#define PVBM_useful_ix sv_I32p | offsetof(struct xpvbm, xbm_useful)