summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Holland-Moritz <mhx-perl@gmx.net>2007-12-29 19:17:42 +0100
committerMarcus Holland-Moritz <mhx-perl@gmx.net>2007-12-30 10:30:15 +0000
commit20f4945e16943f141ab760ffdcdbf39a5f3b734e (patch)
treec11ee3b84517648779c89e56235d14bfb9a838ac
parent02f90d034df1b2bf848e5c8f7ede725dc7c7faa9 (diff)
downloadperl-20f4945e16943f141ab760ffdcdbf39a5f3b734e.tar.gz
factor out duplicate code in struct xpv*
Message-ID: <20071229181742.1933db40@r2d2> p4raw-id: //depot/perl@32783
-rw-r--r--av.h56
-rw-r--r--cv.h83
-rw-r--r--hv.h56
-rw-r--r--perl.h5
-rw-r--r--sv.h391
5 files changed, 127 insertions, 464 deletions
diff --git a/av.h b/av.h
index b3f56ff179..3c40dc8fe8 100644
--- a/av.h
+++ b/av.h
@@ -8,53 +8,27 @@
*
*/
+#define _XPVAV_ALLOCATED_HEAD \
+ SSize_t xav_fill; /* Index of last element present */ \
+ SSize_t xav_max /* max index for which array has space */
+
+#define _XPVAV_HEAD \
+ union _xnvu xnv_u; \
+ _XPVAV_ALLOCATED_HEAD
+
struct xpvav {
- union {
- NV xnv_nv; /* numeric value, if any */
- HV * xgv_stash;
- struct {
- U32 xlow;
- U32 xhigh;
- } xpad_cop_seq; /* used by pad.c for cop_sequence */
- struct {
- U32 xbm_previous; /* how many characters in string before rare? */
- U8 xbm_flags;
- U8 xbm_rare; /* rarest character in string */
- } xbm_s; /* fields from PVBM */
- } xnv_u;
- SSize_t xav_fill; /* Index of last element present */
- SSize_t xav_max; /* max index for which array has space */
- union {
- IV xivu_iv; /* integer value or pv offset */
- UV xivu_uv;
- void * xivu_p1;
- I32 xivu_i32;
- HEK * xivu_namehek;
- } xiv_u;
- union {
- MAGIC* xmg_magic; /* linked list of magicalness */
- HV* xmg_ourstash; /* Stash for our (when SvPAD_OUR is true) */
- } xmg_u;
- HV* xmg_stash; /* class package */
+ _XPVAV_HEAD;
+ _XPVMG_HEAD;
};
typedef struct {
- SSize_t xav_fill; /* Index of last element present */
- SSize_t xav_max; /* max index for which array has space */
- union {
- IV xivu_iv; /* integer value or pv offset */
- UV xivu_uv;
- void * xivu_p1;
- I32 xivu_i32;
- HEK * xivu_namehek;
- } xiv_u;
- union {
- MAGIC* xmg_magic; /* linked list of magicalness */
- HV* xmg_ourstash; /* Stash for our (when SvPAD_OUR is true) */
- } xmg_u;
- HV* xmg_stash; /* class package */
+ _XPVAV_ALLOCATED_HEAD;
+ _XPVMG_HEAD;
} xpvav_allocated;
+#undef _XPVAV_ALLOCATED_HEAD
+#undef _XPVAV_HEAD
+
/* SV** xav_alloc; */
#define xav_alloc xiv_u.xivu_p1
/* SV* xav_arylen; */
diff --git a/cv.h b/cv.h
index 1b0fc7b612..806fa826ac 100644
--- a/cv.h
+++ b/cv.h
@@ -11,86 +11,15 @@
/* This structure must the beginning of XPVFM in sv.h */
struct xpvcv {
- union {
- NV xnv_nv; /* numeric value, if any */
- HV * xgv_stash;
- struct {
- U32 xlow;
- U32 xhigh;
- } xpad_cop_seq; /* used by pad.c for cop_sequence */
- struct {
- U32 xbm_previous; /* how many characters in string before rare? */
- U8 xbm_flags;
- U8 xbm_rare; /* rarest character in string */
- } xbm_s; /* fields from PVBM */
- } xnv_u;
- STRLEN xpv_cur; /* length of xp_pv as a C string */
- STRLEN xpv_len; /* allocated size */
- union {
- IV xivu_iv;
- UV xivu_uv;
- void * xivu_p1;
- I32 xivu_i32; /* depth, >= 2 indicates recursive call */
- HEK * xivu_namehek;
- } xiv_u;
- union {
- MAGIC* xmg_magic; /* linked list of magicalness */
- HV* xmg_ourstash; /* Stash for our (when SvPAD_OUR is true) */
- } xmg_u;
- HV* xmg_stash; /* class package */
-
- HV * xcv_stash;
- union {
- OP * xcv_start;
- ANY xcv_xsubany;
- } xcv_start_u;
- union {
- OP * xcv_root;
- void (*xcv_xsub) (pTHX_ CV*);
- } xcv_root_u;
- GV * xcv_gv;
- char * xcv_file;
- PADLIST * xcv_padlist;
- CV * xcv_outside;
- U32 xcv_outside_seq; /* the COP sequence (at the point of our
- * compilation) in the lexically enclosing
- * sub */
- cv_flags_t xcv_flags;
+ _XPV_HEAD;
+ _XPVMG_HEAD;
+ _XPVCV_COMMON;
};
typedef struct {
- STRLEN xpv_cur; /* length of xp_pv as a C string */
- STRLEN xpv_len; /* allocated size */
- union {
- IV xivu_iv;
- UV xivu_uv;
- void * xivu_p1;
- I32 xivu_i32; /* depth, >= 2 indicates recursive call */
- HEK * xivu_namehek;
- } xiv_u;
- union {
- MAGIC* xmg_magic; /* linked list of magicalness */
- HV* xmg_ourstash; /* Stash for our (when SvPAD_OUR is true) */
- } xmg_u;
- HV* xmg_stash; /* class package */
-
- HV * xcv_stash;
- union {
- OP * xcv_start;
- ANY xcv_xsubany;
- } xcv_start_u;
- union {
- OP * xcv_root;
- void (*xcv_xsub) (pTHX_ CV*);
- } xcv_root_u;
- GV * xcv_gv;
- char * xcv_file;
- PADLIST * xcv_padlist;
- CV * xcv_outside;
- U32 xcv_outside_seq; /* the COP sequence (at the point of our
- * compilation) in the lexically enclosing
- * sub */
- cv_flags_t xcv_flags;
+ _XPV_ALLOCATED_HEAD;
+ _XPVMG_HEAD;
+ _XPVCV_COMMON;
} xpvcv_allocated;
/*
diff --git a/hv.h b/hv.h
index dd35ae58e6..b1f2ce2006 100644
--- a/hv.h
+++ b/hv.h
@@ -66,57 +66,31 @@ struct xpvhv_aux {
struct mro_meta *xhv_mro_meta;
};
+#define _XPVHV_ALLOCATED_HEAD \
+ STRLEN xhv_fill; /* how full xhv_array currently is */ \
+ STRLEN xhv_max; /* subscript of last element of xhv_array */
+
+#define _XPVHV_HEAD \
+ union _xnvu xnv_u; \
+ _XPVHV_ALLOCATED_HEAD
+
/* hash structure: */
/* This structure must match the beginning of struct xpvmg in sv.h. */
struct xpvhv {
- union {
- NV xnv_nv; /* numeric value, if any */
- HV * xgv_stash;
- struct {
- U32 xlow;
- U32 xhigh;
- } xpad_cop_seq; /* used by pad.c for cop_sequence */
- struct {
- U32 xbm_previous; /* how many characters in string before rare? */
- U8 xbm_flags;
- U8 xbm_rare; /* rarest character in string */
- } xbm_s; /* fields from PVBM */
- } xnv_u;
- STRLEN xhv_fill; /* how full xhv_array currently is */
- STRLEN xhv_max; /* subscript of last element of xhv_array */
- union {
- IV xivu_iv; /* integer value or pv offset */
- UV xivu_uv;
- void * xivu_p1;
- I32 xivu_i32;
- HEK * xivu_namehek;
- } xiv_u;
- union {
- MAGIC* xmg_magic; /* linked list of magicalness */
- HV* xmg_ourstash; /* Stash for our (when SvPAD_OUR is true) */
- } xmg_u;
- HV* xmg_stash; /* class package */
+ _XPVHV_HEAD;
+ _XPVMG_HEAD;
};
#define xhv_keys xiv_u.xivu_iv
typedef struct {
- STRLEN xhv_fill; /* how full xhv_array currently is */
- STRLEN xhv_max; /* subscript of last element of xhv_array */
- union {
- IV xivu_iv; /* integer value or pv offset */
- UV xivu_uv;
- void * xivu_p1;
- I32 xivu_i32;
- HEK * xivu_namehek;
- } xiv_u;
- union {
- MAGIC* xmg_magic; /* linked list of magicalness */
- HV* xmg_ourstash; /* Stash for our (when SvPAD_OUR is true) */
- } xmg_u;
- HV* xmg_stash; /* class package */
+ _XPVHV_ALLOCATED_HEAD;
+ _XPVMG_HEAD;
} xpvhv_allocated;
+#undef _XPVHV_ALLOCATED_HEAD
+#undef _XPVHV_HEAD
+
/* hash a key */
/* FYI: This is the "One-at-a-Time" algorithm by Bob Jenkins
* from requirements by Colin Plumb.
diff --git a/perl.h b/perl.h
index 2f889c241d..a337a8ce5a 100644
--- a/perl.h
+++ b/perl.h
@@ -3325,6 +3325,11 @@ struct nexttoken {
#include "warnings.h"
#include "utf8.h"
+/* defined in sv.c, but also used in [ach]v.c */
+#undef _XPV_ALLOCATED_HEAD
+#undef _XPV_HEAD
+#undef _XPVMG_HEAD
+#undef _XPVCV_COMMON
typedef struct _sublex_info SUBLEXINFO;
struct _sublex_info {
diff --git a/sv.h b/sv.h
index 6855e6ea2c..443a3de14e 100644
--- a/sv.h
+++ b/sv.h
@@ -392,210 +392,94 @@ perform the upgrade if necessary. See C<svtype>.
/* RV upwards. However, SVf_ROK and SVp_IOK are exclusive */
#define SVprv_WEAKREF 0x80000000 /* Weak reference */
+#define _XPV_ALLOCATED_HEAD \
+ STRLEN xpv_cur; /* length of svu_pv as a C string */ \
+ STRLEN xpv_len /* allocated size */
+
+#define _XPV_HEAD \
+ union _xnvu xnv_u; \
+ _XPV_ALLOCATED_HEAD
+
+union _xnvu {
+ NV xnv_nv; /* numeric value, if any */
+ HV * xgv_stash;
+ struct {
+ U32 xlow;
+ U32 xhigh;
+ } xpad_cop_seq; /* used by pad.c for cop_sequence */
+ struct {
+ U32 xbm_previous; /* how many characters in string before rare? */
+ U8 xbm_flags;
+ U8 xbm_rare; /* rarest character in string */
+ } xbm_s; /* fields from PVBM */
+};
+
+union _xivu {
+ IV xivu_iv; /* integer value */
+ /* xpvfm: pv offset */
+ UV xivu_uv;
+ void * xivu_p1;
+ I32 xivu_i32;
+ HEK * xivu_namehek; /* xpvlv, xpvgv: GvNAME */
+};
+
+union _xmgu {
+ MAGIC* xmg_magic; /* linked list of magicalness */
+ HV* xmg_ourstash; /* Stash for our (when SvPAD_OUR is true) */
+};
struct xpv {
- union {
- NV xnv_nv; /* numeric value, if any */
- HV * xgv_stash;
- struct {
- U32 xlow;
- U32 xhigh;
- } xpad_cop_seq; /* used by pad.c for cop_sequence */
- struct {
- U32 xbm_previous; /* how many characters in string before rare? */
- U8 xbm_flags;
- U8 xbm_rare; /* rarest character in string */
- } xbm_s; /* fields from PVBM */
- } xnv_u;
- STRLEN xpv_cur; /* length of svu_pv as a C string */
- STRLEN xpv_len; /* allocated size */
+ _XPV_HEAD;
};
typedef struct {
- STRLEN xpv_cur; /* length of svu_pv as a C string */
- STRLEN xpv_len; /* allocated size */
+ _XPV_ALLOCATED_HEAD;
} xpv_allocated;
struct xpviv {
- union {
- NV xnv_nv; /* numeric value, if any */
- HV * xgv_stash;
- struct {
- U32 xlow;
- U32 xhigh;
- } xpad_cop_seq; /* used by pad.c for cop_sequence */
- struct {
- U32 xbm_previous; /* how many characters in string before rare? */
- U8 xbm_flags;
- U8 xbm_rare; /* rarest character in string */
- } xbm_s; /* fields from PVBM */
- } xnv_u;
- STRLEN xpv_cur; /* length of svu_pv as a C string */
- STRLEN xpv_len; /* allocated size */
- union {
- IV xivu_iv; /* integer value or pv offset */
- UV xivu_uv;
- void * xivu_p1;
- I32 xivu_i32;
- HEK * xivu_namehek;
- } xiv_u;
+ _XPV_HEAD;
+ union _xivu xiv_u;
};
typedef struct {
- STRLEN xpv_cur; /* length of svu_pv as a C string */
- STRLEN xpv_len; /* allocated size */
- union {
- IV xivu_iv; /* integer value or pv offset */
- UV xivu_uv;
- void * xivu_p1;
- I32 xivu_i32;
- HEK * xivu_namehek;
- } xiv_u;
+ _XPV_ALLOCATED_HEAD;
+ union _xivu xiv_u;
} xpviv_allocated;
#define xiv_iv xiv_u.xivu_iv
struct xpvuv {
- union {
- NV xnv_nv; /* numeric value, if any */
- HV * xgv_stash;
- struct {
- U32 xlow;
- U32 xhigh;
- } xpad_cop_seq; /* used by pad.c for cop_sequence */
- struct {
- U32 xbm_previous; /* how many characters in string before rare? */
- U8 xbm_flags;
- U8 xbm_rare; /* rarest character in string */
- } xbm_s; /* fields from PVBM */
- } xnv_u;
- STRLEN xpv_cur; /* length of svu_pv as a C string */
- STRLEN xpv_len; /* allocated size */
- union {
- IV xuvu_iv;
- UV xuvu_uv; /* unsigned value or pv offset */
- void * xuvu_p1;
- HEK * xivu_namehek;
- } xuv_u;
+ _XPV_HEAD;
+ union _xivu xuv_u;
};
-#define xuv_uv xuv_u.xuvu_uv
+#define xuv_uv xuv_u.xivu_uv
struct xpvnv {
- union {
- NV xnv_nv; /* numeric value, if any */
- HV * xgv_stash;
- struct {
- U32 xlow;
- U32 xhigh;
- } xpad_cop_seq; /* used by pad.c for cop_sequence */
- struct {
- U32 xbm_previous; /* how many characters in string before rare? */
- U8 xbm_flags;
- U8 xbm_rare; /* rarest character in string */
- } xbm_s; /* fields from PVBM */
- } xnv_u;
- STRLEN xpv_cur; /* length of svu_pv as a C string */
- STRLEN xpv_len; /* allocated size */
- union {
- IV xivu_iv; /* integer value or pv offset */
- UV xivu_uv;
- void * xivu_p1;
- I32 xivu_i32;
- HEK * xivu_namehek;
- } xiv_u;
+ _XPV_HEAD;
+ union _xivu xiv_u;
};
+#define _XPVMG_HEAD \
+ union _xivu xiv_u; \
+ union _xmgu xmg_u; \
+ HV* xmg_stash /* class package */
+
/* These structure must match the beginning of struct xpvhv in hv.h. */
struct xpvmg {
- union {
- NV xnv_nv; /* numeric value, if any */
- HV * xgv_stash;
- struct {
- U32 xlow;
- U32 xhigh;
- } xpad_cop_seq; /* used by pad.c for cop_sequence */
- struct {
- U32 xbm_previous; /* how many characters in string before rare? */
- U8 xbm_flags;
- U8 xbm_rare; /* rarest character in string */
- } xbm_s; /* fields from PVBM */
- } xnv_u;
- STRLEN xpv_cur; /* length of svu_pv as a C string */
- STRLEN xpv_len; /* allocated size */
- union {
- IV xivu_iv; /* integer value or pv offset */
- UV xivu_uv;
- void * xivu_p1;
- I32 xivu_i32;
- HEK * xivu_namehek;
- } xiv_u;
- union {
- MAGIC* xmg_magic; /* linked list of magicalness */
- HV* xmg_ourstash; /* Stash for our (when SvPAD_OUR is true) */
- } xmg_u;
- HV* xmg_stash; /* class package */
+ _XPV_HEAD;
+ _XPVMG_HEAD;
};
struct xregexp {
- union {
- NV xnv_nv; /* numeric value, if any */
- HV * xgv_stash;
- struct {
- U32 xlow;
- U32 xhigh;
- } xpad_cop_seq; /* used by pad.c for cop_sequence */
- struct {
- U32 xbm_previous; /* how many characters in string before rare? */
- U8 xbm_flags;
- U8 xbm_rare; /* rarest character in string */
- } xbm_s; /* fields from PVBM */
- } xnv_u;
- STRLEN xpv_cur; /* length of svu_pv as a C string */
- STRLEN xpv_len; /* allocated size */
- union {
- IV xivu_iv; /* integer value or pv offset */
- UV xivu_uv;
- void * xivu_p1;
- I32 xivu_i32;
- HEK * xivu_namehek;
- } xiv_u;
- union {
- MAGIC* xmg_magic; /* linked list of magicalness */
- HV* xmg_ourstash; /* Stash for our (when SvPAD_OUR is true) */
- } xmg_u;
- HV* xmg_stash; /* class package */
+ _XPV_HEAD;
+ _XPVMG_HEAD;
REGEXP * xrx_regexp; /* Our regular expression */
};
struct xpvlv {
- union {
- NV xnv_nv; /* numeric value, if any */
- HV * xgv_stash;
- struct {
- U32 xlow;
- U32 xhigh;
- } xpad_cop_seq; /* used by pad.c for cop_sequence */
- struct {
- U32 xbm_previous; /* how many characters in string before rare? */
- U8 xbm_flags;
- U8 xbm_rare; /* rarest character in string */
- } xbm_s; /* fields from PVBM */
- } xnv_u;
- STRLEN xpv_cur; /* length of svu_pv as a C string */
- STRLEN xpv_len; /* allocated size */
- union {
- IV xivu_iv; /* integer value or pv offset */
- UV xivu_uv;
- void * xivu_p1;
- I32 xivu_i32;
- HEK * xivu_namehek; /* GvNAME */
- } xiv_u;
- union {
- MAGIC* xmg_magic; /* linked list of magicalness */
- HV* xmg_ourstash; /* Stash for our (when SvPAD_OUR is true) */
- } xmg_u;
- HV* xmg_stash; /* class package */
+ _XPV_HEAD;
+ _XPVMG_HEAD;
STRLEN xlv_targoff;
STRLEN xlv_targlen;
@@ -607,153 +491,50 @@ struct xpvlv {
/* This structure works in 3 ways - regular scalar, GV with GP, or fast
Boyer-Moore. */
struct xpvgv {
- union {
- NV xnv_nv;
- HV * xgv_stash; /* The stash of this GV */
- struct {
- U32 xlow;
- U32 xhigh;
- } xpad_cop_seq; /* used by pad.c for cop_sequence */
- struct {
- U32 xbm_previous; /* how many characters in string before rare? */
- U8 xbm_flags;
- U8 xbm_rare; /* rarest character in string */
- } xbm_s; /* fields from PVBM */
- } xnv_u;
- STRLEN xpv_cur; /* xgv_flags */
- STRLEN xpv_len; /* 0 */
- union {
- IV xivu_iv;
- UV xivu_uv;
- void * xivu_p1;
- I32 xivu_i32; /* is this constant pattern being useful? */
- HEK * xivu_namehek; /* GvNAME */
- } xiv_u;
- union {
- MAGIC* xmg_magic; /* linked list of magicalness */
- HV* xmg_ourstash; /* Stash for our (when SvPAD_OUR is true) */
- } xmg_u;
- HV* xmg_stash; /* class package */
-
+ _XPV_HEAD;
+ _XPVMG_HEAD;
};
/* This structure must match XPVCV in cv.h */
typedef U16 cv_flags_t;
-struct xpvfm {
- union {
- NV xnv_nv; /* numeric value, if any */
- HV * xgv_stash;
- struct {
- U32 xlow;
- U32 xhigh;
- } xpad_cop_seq; /* used by pad.c for cop_sequence */
- struct {
- U32 xbm_previous; /* how many characters in string before rare? */
- U8 xbm_flags;
- U8 xbm_rare; /* rarest character in string */
- } xbm_s; /* fields from PVBM */
- } xnv_u;
- STRLEN xpv_cur; /* length of svu_pv as a C string */
- STRLEN xpv_len; /* allocated size */
- union {
- IV xivu_iv; /* PVFMs use the pv offset */
- UV xivu_uv;
- void * xivu_p1;
- I32 xivu_i32;
- HEK * xivu_namehek;
- } xiv_u;
- union {
- MAGIC* xmg_magic; /* linked list of magicalness */
- HV* xmg_ourstash; /* Stash for our (when SvPAD_OUR is true) */
- } xmg_u;
- HV* xmg_stash; /* class package */
+#define _XPVCV_COMMON \
+ HV * xcv_stash; \
+ union { \
+ OP * xcv_start; \
+ ANY xcv_xsubany; \
+ } xcv_start_u; \
+ union { \
+ OP * xcv_root; \
+ void (*xcv_xsub) (pTHX_ CV*); \
+ } xcv_root_u; \
+ GV * xcv_gv; \
+ char * xcv_file; \
+ AV * xcv_padlist; \
+ CV * xcv_outside; \
+ U32 xcv_outside_seq; /* the COP sequence (at the point of our \
+ * compilation) in the lexically enclosing \
+ * sub */ \
+ cv_flags_t xcv_flags
- HV * xcv_stash;
- union {
- OP * xcv_start;
- ANY xcv_xsubany;
- } xcv_start_u;
- union {
- OP * xcv_root;
- void (*xcv_xsub) (pTHX_ CV*);
- } xcv_root_u;
- GV * xcv_gv;
- char * xcv_file;
- AV * xcv_padlist;
- CV * xcv_outside;
- U32 xcv_outside_seq; /* the COP sequence (at the point of our
- * compilation) in the lexically enclosing
- * sub */
- cv_flags_t xcv_flags;
+struct xpvfm {
+ _XPV_HEAD;
+ _XPVMG_HEAD;
+ _XPVCV_COMMON;
IV xfm_lines;
};
typedef struct {
- STRLEN xpv_cur; /* length of svu_pv as a C string */
- STRLEN xpv_len; /* allocated size */
- union {
- IV xivu_iv; /* PVFMs use the pv offset */
- UV xivu_uv;
- void * xivu_p1;
- I32 xivu_i32;
- HEK * xivu_namehek;
- } xiv_u;
- union {
- MAGIC* xmg_magic; /* linked list of magicalness */
- HV* xmg_ourstash; /* Stash for our (when SvPAD_OUR is true) */
- } xmg_u;
- HV* xmg_stash; /* class package */
-
- HV * xcv_stash;
- union {
- OP * xcv_start;
- ANY xcv_xsubany;
- } xcv_start_u;
- union {
- OP * xcv_root;
- void (*xcv_xsub) (pTHX_ CV*);
- } xcv_root_u;
- GV * xcv_gv;
- char * xcv_file;
- AV * xcv_padlist;
- CV * xcv_outside;
- U32 xcv_outside_seq; /* the COP sequence (at the point of our
- * compilation) in the lexically enclosing
- * sub */
- cv_flags_t xcv_flags;
+ _XPV_ALLOCATED_HEAD;
+ _XPVMG_HEAD;
+ _XPVCV_COMMON;
IV xfm_lines;
} xpvfm_allocated;
struct xpvio {
- union {
- NV xnv_nv; /* numeric value, if any */
- HV * xgv_stash;
- struct {
- U32 xlow;
- U32 xhigh;
- } xpad_cop_seq; /* used by pad.c for cop_sequence */
- struct {
- U32 xbm_previous; /* how many characters in string before rare? */
- U8 xbm_flags;
- U8 xbm_rare; /* rarest character in string */
- } xbm_s; /* fields from PVBM */
- } xnv_u;
- STRLEN xpv_cur; /* length of svu_pv as a C string */
- STRLEN xpv_len; /* allocated size */
- union {
- IV xivu_iv; /* integer value or pv offset */
- UV xivu_uv;
- void * xivu_p1;
- I32 xivu_i32;
- HEK * xivu_namehek;
- } xiv_u;
- union {
- MAGIC* xmg_magic; /* linked list of magicalness */
- HV* xmg_ourstash; /* Stash for our (when SvPAD_OUR is true) */
- } xmg_u;
- HV* xmg_stash; /* class package */
+ _XPV_HEAD;
+ _XPVMG_HEAD;
PerlIO * xio_ifp; /* ifp and ofp are normally the same */
PerlIO * xio_ofp; /* but sockets need separate streams */