summaryrefslogtreecommitdiff
path: root/gv.h
diff options
context:
space:
mode:
authorSteve Hay <SteveHay@planit.com>2006-01-04 10:39:13 +0000
committerSteve Hay <SteveHay@planit.com>2006-01-04 10:39:13 +0000
commit834268b87a8eb670d899a13106c8dfcdfc7c9b66 (patch)
tree8d3eb5624090c275a1d7e48f000d9ae9cdc093c8 /gv.h
parentfe8247ebb5b1d41f5123d00da404f1a03c6a9e78 (diff)
downloadperl-834268b87a8eb670d899a13106c8dfcdfc7c9b66.tar.gz
Workaround Win32 compiler bugs following change 26395
Can't understand what VC++ 6 and Borland don't like about it. There is similar code for SvMAGIC and SvSTASH already in sv.h. Must be compiler bugs since VC++ 7 and MinGW (and compilers on other platforms) are all happy. p4raw-id: //depot/perl@26634
Diffstat (limited to 'gv.h')
-rw-r--r--gv.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/gv.h b/gv.h
index a97d4ba61e..97d3cd0322 100644
--- a/gv.h
+++ b/gv.h
@@ -24,7 +24,11 @@ struct gp {
#define GvXPVGV(gv) ((XPVGV*)SvANY(gv))
-#ifdef DEBUGGING
+/* MSVC++ 6.0 (_MSC_VER == 1200) can't compile pp_hot.c with DEBUGGING enabled
+ * if we include the following assert(). Must be a compiler bug because it
+ * works fine with MSVC++ 7.0. Borland (5.5.1) has the same problem. */
+#if defined(DEBUGGING) && \
+ ((!defined(_MSC_VER) || _MSC_VER > 1200) && !defined(__BORLANDC__))
# define GvGP(gv) (*(assert(SvTYPE(gv) == SVt_PVGV || \
SvTYPE(gv) == SVt_PVLV), \
&(GvXPVGV(gv)->xgv_gp)))