]> git.vpit.fr Git - perl/modules/Lexical-Types.git/commitdiff
Use cop_hints_fetch_pvn() whenever possible
authorVincent Pit <vince@profvince.com>
Fri, 31 Dec 2010 16:36:54 +0000 (17:36 +0100)
committerVincent Pit <vince@profvince.com>
Fri, 31 Dec 2010 17:12:50 +0000 (18:12 +0100)
refcounted_he_fetch() never was public, but in recent 5.13.x versions it is
no longer linkable.

Types.xs

index 56b676c7bf454076bd4bfcd1c775784567b416d2..8cf501cc631aec3b350d6baa35c57879ed373b4e 100644 (file)
--- a/Types.xs
+++ b/Types.xs
@@ -316,7 +316,9 @@ STATIC U32 lt_hash = 0;
 STATIC SV *lt_hint(pTHX) {
 #define lt_hint() lt_hint(aTHX)
  SV *hint;
-#if LT_HAS_PERL(5, 9, 5)
+#ifdef cop_hints_fetch_pvn
+ hint = cop_hints_fetch_pvn(PL_curcop, __PACKAGE__, __PACKAGE_LEN__, lt_hash,0);
+#elif LT_HAS_PERL(5, 9, 5)
  hint = Perl_refcounted_he_fetch(aTHX_ PL_curcop->cop_hints_hash,
                                        NULL,
                                        __PACKAGE__, __PACKAGE_LEN__,