diff options
author | Steve Hay <steve.m.hay@googlemail.com> | 2012-08-18 00:33:53 +0100 |
---|---|---|
committer | Steve Hay <steve.m.hay@googlemail.com> | 2012-08-18 00:33:53 +0100 |
commit | f28d8eb1c114895944de593e05ba8271fe1b4fdf (patch) | |
tree | 35c1ae5be7136bac2677557917e75f5aa4e79083 /cv.h | |
parent | 9d2d23d98141e59338d57996fe0c74d36351f6e9 (diff) | |
download | perl-f28d8eb1c114895944de593e05ba8271fe1b4fdf.tar.gz |
Restore VC++ 6 build on Windows
Commits bb02a38feb and 1bd3586145 resulted in VC++ 6 complaining "error
C2099: initializer is not a constant" when initializing bodies_by_type in
sv.c. Workaround the apparent compiler bug using a patch from Jan Dubois,
amended to be compiler-specific as suggested by Nicholas Clark since
anonymous unions are not valid C89.
Date: Wed, 15 Aug 2012 00:55:06 -0700
Message-ID: <005a01cd7abb$498294e0$dc87bea0$@activestate.com>
Diffstat (limited to 'cv.h')
-rw-r--r-- | cv.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -66,7 +66,11 @@ 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 } #if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) # define CvDEPTH(sv) (*({const CV *const _cvdepth = (const CV *)sv; \ |