From: Tim Bunce <Tim.Bunce@pobox.com>
Date: Thu, 4 Oct 2012 08:08:33 +0000 (+0100)
Subject: Fix COPHH for PERL_BCDVERSION < 0x5013007
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d46f501c78973312443d88fcb44b759b6a59c701;p=p5sagit%2FDevel-Size.git

Fix COPHH for PERL_BCDVERSION < 0x5013007
---

diff --git a/SizeMe.xs b/SizeMe.xs
index 3c57790..ddef672 100644
--- a/SizeMe.xs
+++ b/SizeMe.xs
@@ -43,9 +43,6 @@
 #  define SvSHARED_HEK_FROM_PV(pvx) \
         ((struct hek*)(pvx - STRUCT_OFFSET(struct hek, hek_key)))
 #endif
-#ifndef CopHINTHASH_get
-#define CopHINTHASH_get(c)  ((COPHH*)((c)->cop_hints_hash))
-#endif
 #ifndef MUTABLE_AV
 #define MUTABLE_AV(p) ((AV*)p)
 #endif
@@ -952,7 +949,14 @@ op_size_class(pTHX_ const OP * const baseop, opclass op_class, bool skip_op_stru
             sv_size(aTHX_ st, NPathLink("cop_stash"), (SV *)basecop->cop_stash, SOME_RECURSION);
 	  sv_size(aTHX_ st, NPathLink("cop_filegv"), (SV *)basecop->cop_filegv, SOME_RECURSION);
 #endif
+
 #if (PERL_BCDVERSION >= 0x5009004)
+#  if (PERL_BCDVERSION < 0x5013007)
+#    define COPHH struct refcounted_he
+#  endif
+#  ifndef CopHINTHASH_get
+#    define CopHINTHASH_get(c)  ((COPHH*)((c)->cop_hints_hash))
+#  endif
 	  refcounted_he_size(aTHX_ st, CopHINTHASH_get(basecop), NPathLink("cop_hints_hash"));
 #endif
         }