From 501ba3026277333479fde2f8462a44127ed55fa9 Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Fri, 17 Aug 2012 16:52:50 -0700 Subject: [PATCH] =?utf8?q?sv.h:=20Don=E2=80=99t=20repeat=20=5FXPV=5FHEAD?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- cv.h | 6 +----- sv.h | 24 ++++++++---------------- 2 files changed, 9 insertions(+), 21 deletions(-) diff --git a/cv.h b/cv.h index cd722f3..36a3592 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 1c0a0f1..ef2b1ae 100644 --- a/sv.h +++ b/sv.h @@ -417,30 +417,22 @@ perform the upgrade if necessary. See C. * 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 */ -- 2.7.4