summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-08-17 16:52:50 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-08-17 18:15:43 -0700
commit501ba3026277333479fde2f8462a44127ed55fa9 (patch)
tree38ab9c1a72d8f854658be92a0c3929a70afd567c
parent40429ee3823684b44041b4036cd3ba2322094f97 (diff)
downloadperl-501ba3026277333479fde2f8462a44127ed55fa9.tar.gz
sv.h: Don’t repeat _XPV_HEAD
-rw-r--r--cv.h6
-rw-r--r--sv.h24
2 files changed, 9 insertions, 21 deletions
diff --git a/cv.h b/cv.h
index cd722f3c92..36a3592e8f 100644
--- a/cv.h
+++ b/cv.h
@@ -66,11 +66,7 @@ S_CvDEPTHp(const CV * const sv)
{
return SvTYPE(sv) == SVt_PVCV
? &((XPVCV*)SvANY(sv))->xcv_depth
-#if defined(_MSC_VER) && _MSC_VER < 1300
- : &((XPVCV*)SvANY(sv))->xpvcuru_fmdepth;
-#else
- : &((XPVCV*)SvANY(sv))->xpv_cur_u.xpvcuru_fmdepth;
-#endif
+ : &((XPVCV*)SvANY(sv))->xpv_fmdepth;
}
#if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)
# define CvDEPTH(sv) (*({const CV *const _cvdepth = (const CV *)sv; \
diff --git a/sv.h b/sv.h
index 1c0a0f1219..ef2b1ae5f2 100644
--- a/sv.h
+++ b/sv.h
@@ -417,30 +417,22 @@ perform the upgrade if necessary. See C<svtype>.
* using an anonymous union, but only for MSVC6 since that isn't C89.
*/
#if defined(_MSC_VER) && _MSC_VER < 1300
-#define _XPV_HEAD \
- HV* xmg_stash; /* class package */ \
- union _xmgu xmg_u; \
- union { \
- STRLEN xpvcuru_cur; /* length of svu_pv as a C string */ \
- I32 xpvcuru_fmdepth; \
- }; \
- STRLEN xpv_len /* allocated size */
+# define _XPV_CUR_U_NAME
+# define xpv_cur xpvcuru_cur
+# define xpv_fmdepth xpvcuru_fmdepth
#else
+# define _XPV_CUR_U_NAME xpv_cur_u
+# define xpv_cur xpv_cur_u.xpvcuru_cur
+# define xpv_fmdepth xpv_cur_u.xpvcuru_fmdepth
+#endif
#define _XPV_HEAD \
HV* xmg_stash; /* class package */ \
union _xmgu xmg_u; \
union { \
STRLEN xpvcuru_cur; /* length of svu_pv as a C string */ \
I32 xpvcuru_fmdepth; \
- } xpv_cur_u; \
+ } _XPV_CUR_U_NAME; \
STRLEN xpv_len /* allocated size */
-#endif
-
-#if defined(_MSC_VER) && _MSC_VER < 1300
-#define xpv_cur xpvcuru_cur
-#else
-#define xpv_cur xpv_cur_u.xpvcuru_cur
-#endif
union _xnvu {
NV xnv_nv; /* numeric value, if any */