In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/501ba3026277333479fde2f8462a44127ed55fa9?hp=40429ee3823684b44041b4036cd3ba2322094f97>
- Log ----------------------------------------------------------------- commit 501ba3026277333479fde2f8462a44127ed55fa9 Author: Father Chrysostomos <[email protected]> Date: Fri Aug 17 16:52:50 2012 -0700 sv.h: Donât repeat _XPV_HEAD ----------------------------------------------------------------------- Summary of changes: 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<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 */ -- Perl5 Master Repository
