struct xpv {
- NV xnv_nv; /* numeric value, if any */
+ union {
+ NV xnv_nv; /* numeric value, if any */
+ HV * xgv_stash;
+ } xnv_u;
STRLEN xpv_cur; /* length of svu_pv as a C string */
STRLEN xpv_len; /* allocated size */
};
#endif
struct xpviv {
- NV xnv_nv; /* numeric value, if any */
+ union {
+ NV xnv_nv; /* numeric value, if any */
+ HV * xgv_stash;
+ } xnv_u;
STRLEN xpv_cur; /* length of svu_pv as a C string */
STRLEN xpv_len; /* allocated size */
union {
#define xiv_iv xiv_u.xivu_iv
struct xpvuv {
- NV xnv_nv; /* numeric value, if any */
+ union {
+ NV xnv_nv; /* numeric value, if any */
+ HV * xgv_stash;
+ } xnv_u;
STRLEN xpv_cur; /* length of svu_pv as a C string */
STRLEN xpv_len; /* allocated size */
union {
#define xuv_uv xuv_u.xuvu_uv
struct xpvnv {
- NV xnv_nv; /* numeric value, if any */
+ union {
+ NV xnv_nv; /* numeric value, if any */
+ HV * xgv_stash;
+ } xnv_u;
STRLEN xpv_cur; /* length of svu_pv as a C string */
STRLEN xpv_len; /* allocated size */
union {
/* These structure must match the beginning of struct xpvhv in hv.h. */
struct xpvmg {
- NV xnv_nv; /* numeric value, if any */
+ union {
+ NV xnv_nv; /* numeric value, if any */
+ HV * xgv_stash;
+ } xnv_u;
STRLEN xpv_cur; /* length of svu_pv as a C string */
STRLEN xpv_len; /* allocated size */
union {
};
struct xpvlv {
- NV xnv_nv; /* numeric value, if any */
+ union {
+ NV xnv_nv; /* numeric value, if any */
+ HV * xgv_stash;
+ } xnv_u;
STRLEN xpv_cur; /* length of svu_pv as a C string */
STRLEN xpv_len; /* allocated size */
union {
/* a full glob fits into this */
char* xgv_name;
STRLEN xgv_namelen;
- HV* xgv_stash;
U8 xgv_flags;
STRLEN xlv_targoff;
};
struct xpvgv {
- NV xnv_nv; /* numeric value, if any */
+ union {
+ NV xnv_nv;
+ HV * xgv_stash; /* The stash of this GV */
+ } xnv_u;
STRLEN xpv_cur; /* length of svu_pv as a C string */
STRLEN xpv_len; /* allocated size */
union {
char* xgv_name;
STRLEN xgv_namelen;
- HV* xgv_stash;
U8 xgv_flags;
};
struct xpvbm {
- NV xnv_nv; /* numeric value, if any */
+ union {
+ NV xnv_nv; /* numeric value, if any */
+ HV * xgv_stash;
+ } xnv_u;
STRLEN xpv_cur; /* length of svu_pv as a C string */
STRLEN xpv_len; /* allocated size */
union {
typedef U16 cv_flags_t;
struct xpvfm {
- NV xnv_nv; /* numeric value, if any */
+ union {
+ NV xnv_nv; /* numeric value, if any */
+ HV * xgv_stash;
+ } xnv_u;
STRLEN xpv_cur; /* length of svu_pv as a C string */
STRLEN xpv_len; /* allocated size */
union {
} xpvfm_allocated;
struct xpvio {
- NV xnv_nv; /* numeric value, if any */
+ union {
+ NV xnv_nv; /* numeric value, if any */
+ HV * xgv_stash;
+ } xnv_u;
STRLEN xpv_cur; /* length of svu_pv as a C string */
STRLEN xpv_len; /* allocated size */
union {
+0.0 + -0.0 => +0.0 but -0.0 + -0.0 => -0.0 */
# define SvIVX(sv) (0 + ((XPVIV*) SvANY(sv))->xiv_iv)
# define SvUVX(sv) (0 + ((XPVUV*) SvANY(sv))->xuv_uv)
-# define SvNVX(sv) (-0.0 + ((XPVNV*) SvANY(sv))->xnv_nv)
+# define SvNVX(sv) (-0.0 + ((XPVNV*) SvANY(sv))->xnv_u.xnv_nv)
/* Don't test the core XS code yet. */
# if defined (PERL_CORE) && PERL_DEBUG_COW > 1
# define SvPVX(sv) (0 + (assert(!SvREADONLY(sv)), (sv)->sv_u.svu_pv))
assert(SvTYPE(_svi) != SVt_PVHV); \
assert(SvTYPE(_svi) != SVt_PVFM); \
assert(!isGV_with_GP(_svi)); \
- &(((XPVNV*) SvANY(_svi))->xnv_nv); \
+ &(((XPVNV*) SvANY(_svi))->xnv_u.xnv_nv); \
}))
# define SvMAGIC(sv) \
(*({ SV *const _svi = (SV *) sv; \
# define SvPVX(sv) ((sv)->sv_u.svu_pv)
# define SvIVX(sv) ((XPVIV*) SvANY(sv))->xiv_iv
# define SvUVX(sv) ((XPVUV*) SvANY(sv))->xuv_uv
-# define SvNVX(sv) ((XPVNV*) SvANY(sv))->xnv_nv
+# define SvNVX(sv) ((XPVNV*) SvANY(sv))->xnv_u.xnv_nv
# define SvMAGIC(sv) ((XPVMG*) SvANY(sv))->xmg_u.xmg_magic
# define SvSTASH(sv) ((XPVMG*) SvANY(sv))->xmg_stash
# endif
#define SvNV_set(sv, val) \
STMT_START { assert(SvTYPE(sv) == SVt_NV || SvTYPE(sv) >= SVt_PVNV); \
assert(SvTYPE(sv) != SVt_PVAV); assert(SvTYPE(sv) != SVt_PVHV); \
- (((XPVNV*)SvANY(sv))->xnv_nv = (val)); } STMT_END
+ (((XPVNV*)SvANY(sv))->xnv_u.xnv_nv = (val)); } STMT_END
#define SvPV_set(sv, val) \
STMT_START { assert(SvTYPE(sv) >= SVt_PV); \
((sv)->sv_u.svu_pv = (val)); } STMT_END