{
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; \
5.17.2, have now been extended to the perl DLL itself.
Building with VC++ 6.0 was inadvertently broken in Perl 5.17.2 but has now been
-fixed again. XXX Actually, it's now been broken again, so ensure that it gets
-fixed once more before release, or remove this comment!
+fixed again.
=item VMS
/* pad name vars only */
#define SVpad_STATE 0x80000000 /* pad name is a "state" var */
+/* MSVC6 generates "error C2099: initializer is not a constant" when
+ * initializing bodies_by_type in sv.c. Workaround the compiler bug by
+ * 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 */
+#else
#define _XPV_HEAD \
HV* xmg_stash; /* class package */ \
union _xmgu xmg_u; \
I32 xpvcuru_fmdepth; \
} xpv_cur_u; \
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 */